Bhavya Mathur
Bhavya Mathur

Reputation: 11

Are multiple App Registrations on Azure for SPA and web API necessary?

Are multiple App Registrations on Azure for SPA and web API necessary? I am making a SPA and API server by following this sample.

Here, I had to register multiple applications on Azure. Can this be done by using only a single app registration?

Upvotes: 1

Views: 650

Answers (1)

juunas
juunas

Reputation: 58733

It isn't necessary and you can use a single app registration. There used to be a restrictions in app registrations that made it so you basically had to make an app for each piece. Now you can even add all of the platforms under the one app registration.

I think you cannot restrict the delegated permissions/scopes used by the front-end against your back-end. Since they are the same app from AAD point of view, it can use whatever scopes it wants. This may or may not matter to you.

Another potential scenario to look out for is if you apply delegated permissions to the app registration and you only intend to utilize them from your back-end through the on-behalf-of flow. It is also possible for them to be used from the front-end by a crafty user. Of course the user info in the tokens is the same in both cases.

Upvotes: 1

Related Questions