You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: 5-AccessControl/1-call-api-roles/README.md
+35-9Lines changed: 35 additions & 9 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -17,7 +17,7 @@
17
17
18
18
This sample demonstrates a cross-platform application suite involving an Angular SPA (*TodoListSPA*) calling an ASP.NET Core web API (*TodoListAPI*) secured with the Microsoft identity platform. In doing so, it implements **Role-based Access Control** (RBAC) by using Azure AD **App Roles**.
19
19
20
-
Access control in Azure AD can also be done with **Security Groups** as well, as we will cover in the [next chapter](../2-call-api-groups/README.md). **Security Groups** and **App Roles** in Azure AD are by no means mutually exclusive - they can be used in tandem to provide even finer grained access control.
20
+
Access control in Azure AD can be done with **Security Groups** as well, as we will cover in the [next tutorial](../2-call-api-groups/README.md). **Security Groups** and **App Roles** in Azure AD are by no means mutually exclusive - they can be used in tandem to provide even finer grained access control.
21
21
22
22
## Scenario
23
23
@@ -31,20 +31,20 @@ In the sample, a **dashboard** component allows signed-in users to see the tasks
|`AppCreationScripts`| Contains Powershell scripts to automate app registration. |
37
37
|`ReadmeFiles`| Sample readme files. |
38
38
|`SPA/src/app/auth-config.ts`| Authentication parameters for SPA project reside here. |
39
39
|`SPA/src/app/app.module.ts`| MSAL Angular is initialized here. |
40
+
|`SPA/src/app/role-guard.service.ts`| This service protects other components that require user to be in a role. |
40
41
|`API/appsettings.json`| Authentication parameters for API project reside here. |
41
42
|`API/Startup.cs`| Microsoft.Identity.Web is initialized here. |
42
43
43
44
## Prerequisites
44
45
45
46
- An **Azure AD** tenant. For more information see: [How to get an Azure AD tenant](https://docs.microsoft.com/azure/active-directory/develop/quickstart-create-new-tenant)
46
47
- At least **two** user accounts in your Azure AD tenant.
47
-
- A modern Browser. This sample uses **ES6** conventions and will not run on **Internet Explorer**.
48
48
49
49
## Setup
50
50
@@ -427,18 +427,44 @@ To debug the .NET Core Web API that comes with this sample, install the [C# exte
427
427
428
428
Learn more about using [.NET Core with Visual Studio Code](https://docs.microsoft.com/dotnet/core/tutorials/with-visual-studio-code).
429
429
430
+
## More information
431
+
432
+
-[Microsoft identity platform (Azure Active Directory for developers)](https://docs.microsoft.com/azure/active-directory/develop/)
433
+
-[Overview of Microsoft Authentication Library (MSAL)](https://docs.microsoft.com/azure/active-directory/develop/msal-overview)
434
+
-[Quickstart: Register an application with the Microsoft identity platform (Preview)](https://docs.microsoft.com/azure/active-directory/develop/quickstart-register-app)
435
+
-[Quickstart: Configure a client application to access web APIs (Preview)](https://docs.microsoft.com/azure/active-directory/develop/quickstart-configure-app-access-web-apis)
436
+
-[Understanding Azure AD application consent experiences](https://docs.microsoft.com/azure/active-directory/develop/application-consent-experience)
437
+
-[Understand user and admin consent](https://docs.microsoft.com/azure/active-directory/develop/howto-convert-app-to-be-multi-tenant#understand-user-and-admin-consent)
438
+
-[Initialize client applications using MSAL.js](https://docs.microsoft.com/azure/active-directory/develop/msal-js-initializing-client-applications)
439
+
-[Single sign-on with MSAL.js](https://docs.microsoft.com/azure/active-directory/develop/msal-js-sso)
440
+
-[Handle MSAL.js exceptions and errors](https://docs.microsoft.com/azure/active-directory/develop/msal-handling-exceptions?tabs=javascript)
441
+
-[Logging in MSAL.js applications](https://docs.microsoft.com/azure/active-directory/develop/msal-logging?tabs=javascript)
442
+
-[Pass custom state in authentication requests using MSAL.js](https://docs.microsoft.com/azure/active-directory/develop/msal-js-pass-custom-state-authentication-request)
443
+
-[Prompt behavior in MSAL.js interactive requests](https://docs.microsoft.com/azure/active-directory/develop/msal-js-prompt-behavior)
444
+
-[Use MSAL.js to work with Azure AD B2C](https://docs.microsoft.com/azure/active-directory/develop/msal-b2c-overview)
445
+
446
+
For more information about how OAuth 2.0 protocols work in this scenario and other scenarios, see [Authentication Scenarios for Azure AD](https://docs.microsoft.com/azure/active-directory/develop/authentication-flows-app-scenarios).
447
+
430
448
## Community Help and Support
431
449
432
450
Use [Stack Overflow](http://stackoverflow.com/questions/tagged/msal) to get support from the community.
433
451
Ask your questions on Stack Overflow first and browse existing issues to see if someone has asked your question before.
434
-
Make sure that your questions or comments are tagged with [`azure-active-directory``azure-ad-b2c``ms-identity``msal`].
452
+
Make sure that your questions or comments are tagged with [`msal``dotnet``angular``azure-active-directory`].
435
453
436
-
If you find a bug in the sample, raise the issue on [GitHub Issues](../../../../issues).
454
+
If you find a bug in the sample, please raise the issue on [GitHub Issues](../../issues).
437
455
438
-
To provide feedback on or suggest features for Azure Active Directory, visit [User Voice page](https://feedback.azure.com/forums/169401-azure-active-directory).
456
+
To provide a recommendation, visit the following[User Voice page](https://feedback.azure.com/forums/169401-azure-active-directory).
439
457
440
458
## Contributing
441
459
442
-
If you'd like to contribute to this sample, see [CONTRIBUTING.MD](/CONTRIBUTING.md).
460
+
This project welcomes contributions and suggestions. Most contributions require you to agree to a
461
+
Contributor License Agreement (CLA) declaring that you have the right to, and actually do, grant us
462
+
the rights to use your contribution. For details, visit https://cla.opensource.microsoft.com.
463
+
464
+
When you submit a pull request, a CLA bot will automatically determine whether you need to provide
465
+
a CLA and decorate the PR appropriately (e.g., status check, comment). Simply follow the instructions
466
+
provided by the bot. You will only need to do this once across all repos using our CLA.
443
467
444
-
This project has adopted the [Microsoft Open Source Code of Conduct](https://opensource.microsoft.com/codeofconduct/). For more information, see the [Code of Conduct FAQ](https://opensource.microsoft.com/codeofconduct/faq/) or contact [opencode@microsoft.com](mailto:opencode@microsoft.com) with any additional questions or comments.
468
+
This project has adopted the [Microsoft Open Source Code of Conduct](https://opensource.microsoft.com/codeofconduct/).
469
+
For more information see the [Code of Conduct FAQ](https://opensource.microsoft.com/codeofconduct/faq/) or
470
+
contact [opencode@microsoft.com](mailto:opencode@microsoft.com) with any additional questions or comments.
0 commit comments