You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Aug 28, 2024. It is now read-only.
Is there a way for the code to be able to use this in Controllers or Views.
I need to change views based on the user group access.
I have created users in AD B2C and assigned them in Group but this is not comming in the Token so I assume Graph API needs to be used.
Let me know your thoughts.
Steve
The text was updated successfully, but these errors were encountered:
It's not going to come through the as a token, which is why I created this sample project to use Group Authorization to query Graph API for the user's membership info. I am using a modified version of this (with caching!) in a production app and it works pretty well.
Ya I took a look at that article also and it is ugly like the author mentioned and did not want to go there. I assume in the Controller and View I would need to write methods to use the Graph API to check the group membership like your service? Did you find issues with performance and you cached the users Group membership?
Is going to be a lot easier than trying to use Graph API in your Views.
If you need Graph API information for a user, my suggestion would be to have a UserRepository object that does those lookups for you (and caches them as well). Another option would be to have a separate data store for additional app-specific user information.
Sign up for freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Is there a way for the code to be able to use this in Controllers or Views.
I need to change views based on the user group access.
I have created users in AD B2C and assigned them in Group but this is not comming in the Token so I assume Graph API needs to be used.
Let me know your thoughts.
Steve
The text was updated successfully, but these errors were encountered: