ms-identity-javascript-angular-spa-dotnetcore-webapi-roles-groups | Angular single-page application | Identity Management library
kandi X-RAY | ms-identity-javascript-angular-spa-dotnetcore-webapi-roles-groups Summary
kandi X-RAY | ms-identity-javascript-angular-spa-dotnetcore-webapi-roles-groups Summary
Angular single-page application (SPA) calling .NET Core web API using App Roles and Security Groups for Implementing Role-Based Access Control (RBAC) using MSAL Angular
Support
Quality
Security
License
Reuse
Top functions reviewed by kandi - BETA
Currently covering the most popular Java, JavaScript and Python libraries. See a Sample of ms-identity-javascript-angular-spa-dotnetcore-webapi-roles-groups
ms-identity-javascript-angular-spa-dotnetcore-webapi-roles-groups Key Features
ms-identity-javascript-angular-spa-dotnetcore-webapi-roles-groups Examples and Code Snippets
Community Discussions
Trending Discussions on ms-identity-javascript-angular-spa-dotnetcore-webapi-roles-groups
QUESTION
I've been able to successfully use this example code to play with AAD app registrations. I'm confused as to why we need two separate app registrations, one for the front end, and one for the API. Could I just set this up to use one app? If so, is there a drawback to this setup?
Thank you
...ANSWER
Answered 2020-Aug-13 at 23:18You can do that if you wish so, but in general it is not recommended. There are a number of reasons why, but here's a quick example: when granting permissions to an application (either via app permissions or delegated permissions), you should follow the "principle of least privilege" i.e. give just enough permissions to an application and not more. It is quite possible that a client app and a web API will require different scopes/permissions to do the work they need to do, but using the same app registration means that you won't be able to separate the scopes required for each.
A similar case would be where you care more about the protection of your web API than your client app. Say, you use certificates for your web API but only a client secret would do for your client app. Again, in that case, having separate app registrations would allow you to customize each according to their security needs.
Last but not least, say you have multiple client apps (a SPA, a mobile, a desktop app etc.), and a single web API, all in the same app registration. For your business logic, perhaps you need to be able to distinguish from which client app the request comes from. Although there are ways to achieve this with a single app registration, again it is much more hassle free to have separate registrations.
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install ms-identity-javascript-angular-spa-dotnetcore-webapi-roles-groups
Support
Reuse Trending Solutions
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
Find more librariesStay Updated
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page