question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Grant AAD group data plane reader permission does not work

See original GitHub issue

We are continuously addressing and improving the SDK, if possible, make sure the problem persist in the latest SDK version.

Describe the bug I’m following the doc https://docs.microsoft.com/en-us/azure/cosmos-db/how-to-setup-rbac to grant data reader permission to AAD group, then I use one user principal belonging to the AAD group to read container items, however error happens: Forbidden (403); Substatus: 5301; ActivityId: 3e1f99ac-458c-43ac-b557-b1eadd77fc4e; Reason: (Request blocked by Auth *** : Request is blocked because principal [****] does not have required RBAC permissions to perform action [Microsoft.DocumentDB/databaseAccounts/readMetadata] on resource [/]. Learn more: https://aka.ms/cosmos-native-rbac.This could be because the user’s group memberships were not present in the AAD token.

To Reproduce First grant aad group data reader permission, then run code below to use credential belonging to the aad group:

            CosmosClient client1 = new CosmosClient("https://***.documents.azure.com:443/", new InteractiveBrowserCredential());
            var c1 = client1.GetContainer("Regional", "Infra");
            var ret = c1.ReadItemAsync<InfraDoc>("***", new PartitionKey("lgn-rcp::LegionStamp")).Result;

Expected behavior A clear and concise description of what you expected to happen.

No error happens

Actual behavior Provide a description of the actual behavior observed.

Error happens

Environment summary SDK Version: OS Version (e.g. Windows, Linux, MacOSX)

Additional context Add any other context about the problem here (for example, complete stack traces or logs).

Issue Analytics

  • State:closed
  • Created a year ago
  • Comments:7 (7 by maintainers)

github_iconTop GitHub Comments

1reaction
ealsurcommented, Aug 25, 2022

@erich-wang Yeah, the documentation seems unclear. Please feel free to send feedback on that page (at the bottom) so the team working on AAD can update it/polish it.

0reactions
erich-wangcommented, Aug 25, 2022

@ealsur, thanks for follow-up. Based on document from https://docs.microsoft.com/en-us/azure/cosmos-db/how-to-setup-rbac#limits, it gives impression that Azure AD group has been supported for identities that belong to < 200 groups.

  • Azure AD group resolution is not currently supported for identities that belong to more than 200 groups.
Read more comments on GitHub >

github_iconTop Results From Across the Web

Troubleshoot Azure RBAC
This article describes some common solutions for issues related to Azure role-based access control (Azure RBAC).
Read more >
Guidance for using Azure Storage Explorer with Azure AD ...
Reader role does not give users permissions to retrieve Access Key. Data Plane Permissions — These could be assigned using Built-In RBAC Roles ......
Read more >
Authorization in Azure OpenAI Service
One interesting thing to note is that while this role grants all data actions, which include data plane permissions around deployments, users ...
Read more >
Understanding Azure Storage data access permissions
Storage Blob Data Reader: Use to grant read-only permissions to Blob storage resources. Storage Blob Delegator: Get a user delegation key to use ......
Read more >
sql server - Issues with GRANTing permissions to AD group
When I log in as a user of that AD group and try to GRANT ALTER any connection the SQL stmt fails :...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found