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

GetRoles-app not working for users with 100+ AD groups #3

Open
viggotw opened this issue May 11, 2022 · 5 comments
Open

GetRoles-app not working for users with 100+ AD groups #3

viggotw opened this issue May 11, 2022 · 5 comments

Comments

@viggotw
Copy link

viggotw commented May 11, 2022

Hi!

We are using this solution for our template repo, and we have noticed some trouble with the role assignment. From within the same AD group, most users receive the custom role we defined, but a few don't. I believe the problem is caused by there being a max limit of 100 objects being returned when calling the graph-API. After that, you have to use paging.

By playing around in the graph-explorer, I tried modifying the JS-code by instead calling const url = new URL(`https://graph.microsoft.com/v1.0/me/memberOf/${groupId}`);, hoping that the API would only return the relevant object. This worked in the graph-explorer, but did unfortunately not solve the issue for my users.

@chris-dnv
Copy link

Hi Viggo did you ever get this to work? We seem to have the same issue with some users with groups over 100.

@viggotw
Copy link
Author

viggotw commented May 25, 2022

Hi Viggo did you ever get this to work? We seem to have the same issue with some users with groups over 100.

Unfortunately not. We have been in contact with Microsoft and they told us they would look into it. But haven't heard anything in about a week.

@viggotw
Copy link
Author

viggotw commented Jun 20, 2022

@chris-dnv: We have implemented a temporary fix in our own, public repo that might be of interest:
equinor/az-static-web-app-docs-template#36

@chris-dnv
Copy link

@chris-dnv: We have implemented a temporary fix in our own, public repo that might be of interest: equinor/az-static-web-app-docs-template#36
@viggotw thank you very much i will try this out, I didn't get anywhere with my own Microsoft support request unfortunately, do you know if Microsoft are working on a permanent fix at all?

@viggotw
Copy link
Author

viggotw commented Jun 20, 2022

@viggotw thank you very much i will try this out, I didn't get anywhere with my own Microsoft support request unfortunately, do you know if Microsoft are working on a permanent fix at all?

No, sorry - I haven't heard anything about this.

rapopescu16 added a commit to rapopescu16/azure-docs that referenced this issue Jun 22, 2022
I have added a note related to the scenario where we are returning a next page -- https://docs.microsoft.com/en-us/graph/paging
This is as a result of the following git issues: 
Azure/static-web-apps#812
staticwebdev/roles-function#3
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants