Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Groups are no longer listed with the right roles #700

Open
1 of 17 tasks
jorlopama opened this issue May 19, 2023 · 2 comments
Open
1 of 17 tasks

Groups are no longer listed with the right roles #700

jorlopama opened this issue May 19, 2023 · 2 comments

Comments

@jorlopama
Copy link

Please provide us with the following information:

This issue is for a: (mark with an x)

- [x] bug report -> please search issues before submitting
- [ ] feature request
- [ ] documentation issue or request
- [ ] regression (a behavior that used to work and stopped in a new release)

The issue was found for the following scenario:

Please add an 'x' for the scenario(s) where you found an issue

  1. Web app that signs in users
    1. with a work and school account in your organization: 1-WebApp-OIDC/1-1-MyOrg
    2. with any work and school account: /1-WebApp-OIDC/1-2-AnyOrg
    3. with any work or school account or Microsoft personal account: 1-WebApp-OIDC/1-3-AnyOrgOrPersonal
    4. with users in National or sovereign clouds 1-WebApp-OIDC/1-4-Sovereign
    5. with B2C users 1-WebApp-OIDC/1-5-B2C
  2. Web app that calls Microsoft Graph
    1. Calling graph with the Microsoft Graph SDK: 2-WebApp-graph-user/2-1-Call-MSGraph
    2. With specific token caches: 2-WebApp-graph-user/2-2-TokenCache
    3. Calling Microsoft Graph in national clouds: 2-WebApp-graph-user/2-4-Sovereign-Call-MSGraph
  3. Web app calling several APIs 3-WebApp-multi-APIs
  4. Web app calling your own Web API
    1. with a work and school account in your organization: 4-WebApp-your-API/4-1-MyOrg
    2. with B2C users: 4-WebApp-your-API/4-2-B2C
    3. with any work and school account: 4-WebApp-your-API/4-3-AnyOrg
  5. Web app restricting users
    1. by Roles: 5-WebApp-AuthZ/5-1-Roles
    2. by Groups: 5-WebApp-AuthZ/5-2-Groups
  6. Deployment to Azure
  7. Other (please describe)

Repro-ing the issue

Repro steps

I followed all the documentation from https://github.com/Azure-Samples/active-directory-aspnetcore-webapp-openidconnect-v2/tree/master/5-WebApp-AuthZ/5-1-Roles to clone the app and deployed it in an Azure App service

When signing in with the "DirectoryViewers" role , the list of groups where the user is member of is not returned (page is displayed but no list of groups)

When using the UerReader role I can see the list of all users just fine (API permissions are correct and confirmed)

No app errors anywhere, it feels like at some point the graphhelpher call for the groups is coming back empty

Expected behavior
With DirectoryViewers role , signed in user should be able to List all the groups and roles the signed in user is a member of

Actual behavior
Groups not listed (previous versions of the sample are working fine)

Possible Solution
Only a theory, but could far from the solution , I think the _graphServiceClient.Me.MemberOf.Request().GetAsync(); call is coming back empty

Additional context/ Error codes / Screenshots

image

Any log messages given by the failure

Add any other context about the problem here, such as logs.

OS and Version?

Win 11

Versions

of ASP.NET Core 7

Attempting to troubleshooting yourself:

Mention any other details that might be useful


Thanks! We'll be in touch soon.

@btranggg
Copy link

Did you ever figure this out ? I have the same issue.

@jorlopama
Copy link
Author

Did you ever figure this out ? I have the same issue.

Unfortunately no, I had to move on to other things, but was never able to show those groups

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants