Giter Site home page Giter Site logo

ralacher / ms-identity-javascript-angular-spa-dotnetcore-webapi-roles-groups Goto Github PK

View Code? Open in Web Editor NEW

This project forked from azure-samples/ms-identity-javascript-angular-spa-dotnetcore-webapi-roles-groups

0.0 0.0 0.0 588 KB

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 v2 (Preview)

License: MIT License

PowerShell 61.47% C# 13.27% JavaScript 1.53% TypeScript 19.11% CSS 0.80% HTML 3.81%

ms-identity-javascript-angular-spa-dotnetcore-webapi-roles-groups's Introduction

page_type languages products description urlFragment
sample
javascript
typescript
csharp
dotnet
angular
msal-angular
ms-graph
microsoft-identity-web
azure-active-directory
An Angular single-page application (SPA) calling a protected Web API and using App Roles and Security Groups to implement Role-Based Access Control (RBAC)
ms-identity-javascript-angular-spa-dotnetcore-webapi-roles-groups

An Angular single-page application (SPA) calling a protected Web API and using App Roles and Security Groups to implement Role-Based Access Control (RBAC)

This chapterwise tutorial demonstrates how to use Azure AD App Roles and Security Groups features to implement Role-Based Access Control (RBAC) in your application. In doing so, it covers how to modify claims in ID tokens and access tokens, how to protect restricted routes in your client app, and how to accept only authorized calls in your web API. To do so, it uses Microsoft Authentication Library for Angular (Preview) (MSAL Angular) obtain and manage tokens securely.

We recommend you to follow each chapter in a successive order, as the concepts used in later chapters are built on top of the previous ones and explanations may not be repeated. Before proceeding to Chapter 1, please review the Prerequisites below.

Contents

File/folder Description
Chapter 1 Angular SPA calling .NET Core web API and using App Roles.
Chapter 2 Angular SPA calling .NET Core web API and using Security Groups.
ReadmeFiles Contains screenshots and illustrations.
AppCreationScripts/ Contains Powershell scripts for automating app registration.
CONTRIBUTING.md Guidelines for contributing to the sample.
LICENSE The license for the sample.

Prerequisites

  • Node.js must be installed to run this sample.
  • Dotnet Core SDK must be installed to run this sample.
  • An Azure Active Directory (Azure AD) tenant.
  • At least two user accounts in your Azure AD tenant.
  • A modern Browser. This sample uses ES6 conventions and will not run on Internet Explorer.
  • We recommend VS Code for running and debugging this cross-platform application.

Moreover:

A Microsoft identity platform Office Hours session covered Azure AD App roles and security groups, featuring this scenario and this sample. A recording of the session is provided in this video Implement Authorization in your Applications with Microsoft identity platform

Please refer to each chapter's sub-folder for sample-specific prerequisites.

Setup

Step 1

Using a command line interface such as VS Code integrated terminal, clone or download this repository:

git clone https://github.com/Azure-Samples/ms-identity-javascript-angular-spa-dotnetcore-webapi-roles-groups.git

⚠️ Given that the name of the sample is quite long, and so are the names of the referenced NuGet packages, you might want to clone it in a folder close to the root of your hard drive, to avoid file size limitations on Windows.

Step 2

Now let's start with Chapter 1 where we'll learn about using App Roles first.

More information

For more information, visit the following links:

Community Help and Support

Use Stack Overflow to get support from the community. Ask your questions on Stack Overflow first and browse existing issues to see if someone has asked your question before. Make sure that your questions or comments are tagged with [msal dotnet angular azure-active-directory].

If you find a bug in the sample, please raise the issue on GitHub Issues.

To provide a recommendation, visit the following User Voice page.

ℹ️ Consider taking a moment to share your experience with us

Contributing

This project welcomes contributions and suggestions. Most contributions require you to agree to a Contributor License Agreement (CLA) declaring that you have the right to, and actually do, grant us the rights to use your contribution. For details, visit https://cla.opensource.microsoft.com.

Code of Conduct

This project has adopted the Microsoft Open Source Code of Conduct. For more information see the Code of Conduct FAQ or contact [email protected] with any additional questions or comments

ms-identity-javascript-angular-spa-dotnetcore-webapi-roles-groups's People

Contributors

acxmatos avatar derisen avatar jennyf19 avatar jmprieur avatar kalyankrishna1 avatar markrullo avatar microsoft-github-operations[bot] avatar microsoftopensource avatar pmaytak avatar shama-k avatar shivamtawari avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.