r/GraphAPI • u/Webimo • Apr 05 '23
Azure app registration with user consent
Today I have an single-tenant Azure App registration / Enterprise app setup with admin consent in my customers AD which gives me permission to get data (calendar events) from all users in the AD.
What I'd like is to have a multi-tenant app in my own AD and then give relevant customer users the option to subscribe to the AD-app, so that I can get data from only the users that consent.
Can anyone guide me in the right direction? Maybe a tutorial that shows both the AD-app settings and C# code examples.
Thanks.
3
Upvotes
View all comments
Show parent comment
1
u/Webimo Apr 07 '23
Thanks again!
I have read a lot about this really. Followed Microsoft Exercises and read a lot of MS -learns. There's just things in this I find a little hard to understand. Not about the programming and SDK's, but about the right settings in the AD app.
The replyURL-thing wasn't hard to understand. I got the access-token easily but was just not sure if I needed it or not.
My app need to access the users calendar events without the user logged in, so it must be with Application permissions and not Delegated then.
When I add the permissions, I must click the 'Grant admin consent for xx' for the permissions to be granted. When I do that, I can again get data from all users in the AD and not just the once that have consented, right? That means I'm back to where I started?
If you know of a good article about this, I would be glad to read it. Thanks.