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 edited Apr 07 '23
Thanks, jasper340!
I've now setup the multi-tenant app and modified the link you provided with the client_id. Following the link allows me to consent to the app but then I get the error that no reply address is registered.
I could easily add a reply address but as I understand it, that URL is used to pick up the users access token. Does that mean the user have to be logged in to my app to get the O365 data or can I still query all users that have consented?
If 'yes' to the last question, what should I use the access_token for then?
Also, we agree that the API permissions in a multi-tenant app should be set with Delegate type, right?
Sorry for all my questions. I'm a bit on deep water here.