Skip to content
This repository was archived by the owner on Nov 16, 2023. It is now read-only.
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 6 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,9 @@ urlFragment: "active-directory-javascript-singlepageapp-angular"

Demonstrates how to use [MSAL Angular](https://www.npmjs.com/package/@azure/msal-angular) to login, logout, protect a route, and acquire an access token for a protected resource such as Microsoft Graph

**Note:** This sample's structure was generated with the [Angular CLI](https://cli.angular.io/).
**Note:** A quickstart guide covering this sample can be found [here](https://docs.microsoft.com/azure/active-directory/develop/quickstart-v2-angular).

**Note:** A more detailed tutorial covering this sample can be found [here](https://docs.microsoft.com/azure/active-directory/develop/tutorial-v2-angular).

## Key concepts

Expand Down Expand Up @@ -49,6 +51,8 @@ This sample demonstrates the following MSAL Angular concepts:
| `tsconfig.*.json` | TypeScript configuration files. |
| `tslint.json` | TS Lint configuration files. |

**Note:** This sample's structure was generated with the [Angular CLI](https://cli.angular.io/).

## Prerequisites

[Node.js](https://nodejs.org/en/) must be installed to run this sample.
Expand All @@ -57,6 +61,7 @@ This sample demonstrates the following MSAL Angular concepts:

1. [Register a new application](https://docs.microsoft.com/azure/active-directory/develop/scenario-spa-app-registration) in the [Azure Portal](https://portal.azure.com). Ensure that the application is enabled for the [implicit flow](https://docs.microsoft.com/en-us/azure/active-directory/develop/v2-oauth2-implicit-grant-flow).
2. Open [src/app/app.module.ts](./src/app/app.module.ts). Inside `MsalModule.forRoot` provide the required configuration values.
> **Note**: In order to support sign-ins with **work and school accounts** as well as **personal Microsoft accounts**, set your `authority` to use the /common endpoint i.e. `https://login.microsoftonline.com/common`. Read more about [msal.js configuration options](https://docs.microsoft.com/azure/active-directory/develop/msal-js-initializing-client-applications#configuration-options).
3. Install project dependencies from the command line by navigating to the root of the repository and running `npm install`.

## Run the sample
Expand Down