Forum Discussion

helpwithazure's avatar
helpwithazure
Copper Contributor
Oct 24, 2023

Proper authentication type for Azure App

I want to build a simple app that anyone (who has a microsoft, live, or business account, so multi-tenant) can use to create a subscription so my app can pull their emails. I am unsure after reading the documentation which app permissions I should use (delegated or app).

 

With delegated access, I was able to run a sample flow locally, to get access and refresh tokens, which I could use to perform API calls against Graph to create a subscription for new messages, and to check the messages in a users inbox.

 

But I'm not sure if that should be the correct app type, because this app will run behind the scenes. Once someone contents to using my app, this service will run automatically. They will not have to continue logging into my app or be actively on my app to use it. The issue that I cant seem to solve is, app-type doesn't seem to be correct because even if someone from an organization uses my app, I don't want the admin to have to approve the app for everyone to use, so right away it seems like app type is not the correct set of permissions. So if it's delegated, what is the pattern to storing these access tokens for a back-end system to use?

2 Replies