From e1b1a9403aa0331a27f67717eb5e12fab61c3372 Mon Sep 17 00:00:00 2001 From: Dickson Mwendia <64727760+Dickson-Mwendia@users.noreply.github.com> Date: Fri, 17 Mar 2023 12:34:21 +0300 Subject: [PATCH 01/47] test cross -repo reference for msal.js --- .openpublishing.publish.config.json | 6 ++++++ msal/docs-ref-toc/fxtoc.yml | 2 +- msal/overview/msal-react.md | 20 ++++++++++++++++++++ 3 files changed, 27 insertions(+), 1 deletion(-) create mode 100644 msal/overview/msal-react.md diff --git a/.openpublishing.publish.config.json b/.openpublishing.publish.config.json index d27d2bd..27ba746 100644 --- a/.openpublishing.publish.config.json +++ b/.openpublishing.publish.config.json @@ -49,6 +49,12 @@ "url": "https://github.com/Microsoft/templates.docs.msft", "branch": "main", "branch_mapping": {} + }, + { + "path_to_root": "/lib", + "url": "https://github.com/AzureAD/microsoft-authentication-library-for-js", + "branch": "dev", + "branch_mapping": {} } ], "branch_target_mapping": {}, diff --git a/msal/docs-ref-toc/fxtoc.yml b/msal/docs-ref-toc/fxtoc.yml index 4b0c332..51377cf 100644 --- a/msal/docs-ref-toc/fxtoc.yml +++ b/msal/docs-ref-toc/fxtoc.yml @@ -2,6 +2,6 @@ uid: msal.sdk.landingPage.reference landingPageType: Root expanded: true - href: ~/overview/msal-overview.md + href: ~/overview/msal-react.md children: - '**' \ No newline at end of file diff --git a/msal/overview/msal-react.md b/msal/overview/msal-react.md new file mode 100644 index 0000000..0f07c32 --- /dev/null +++ b/msal/overview/msal-react.md @@ -0,0 +1,20 @@ +--- +title: MSAL React +description: Overview of the Microsoft Authentication Libraries for JavaScript +services: active-directory +author: Dickson-Mwendia +manager: CelesteDG + +ms.service: active-directory +ms.subservice: develop +ms.topic: reference +ms.workload: identity +ms.date: 01/10/2023 +ms.author: dmwendia +--- + + +# Getting started with MSAL React + + +[!INCLUDE[MSAL React getting started](~/lib/msal-react/docs/getting-started.md)] \ No newline at end of file From 32fdf6b74b9f3f3472ae65074127ef3e005b7fc5 Mon Sep 17 00:00:00 2001 From: Dickson Mwendia <64727760+Dickson-Mwendia@users.noreply.github.com> Date: Fri, 17 Mar 2023 12:45:46 +0300 Subject: [PATCH 02/47] update root --- .openpublishing.publish.config.json | 2 +- msal/overview/msal-react.md | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.openpublishing.publish.config.json b/.openpublishing.publish.config.json index 27ba746..c7c752f 100644 --- a/.openpublishing.publish.config.json +++ b/.openpublishing.publish.config.json @@ -51,7 +51,7 @@ "branch_mapping": {} }, { - "path_to_root": "/lib", + "path_to_root": "microsoft-authentication-library-for-js", "url": "https://github.com/AzureAD/microsoft-authentication-library-for-js", "branch": "dev", "branch_mapping": {} diff --git a/msal/overview/msal-react.md b/msal/overview/msal-react.md index 0f07c32..17265b5 100644 --- a/msal/overview/msal-react.md +++ b/msal/overview/msal-react.md @@ -1,6 +1,6 @@ --- title: MSAL React -description: Overview of the Microsoft Authentication Libraries for JavaScript +description: Getting started with MSAL React services: active-directory author: Dickson-Mwendia manager: CelesteDG From 9150de0085fe7817bf0f753c0372a53772a050d1 Mon Sep 17 00:00:00 2001 From: Dickson Mwendia <64727760+Dickson-Mwendia@users.noreply.github.com> Date: Fri, 17 Mar 2023 12:48:14 +0300 Subject: [PATCH 03/47] update path to dependent repo --- msal/overview/msal-react.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/msal/overview/msal-react.md b/msal/overview/msal-react.md index 17265b5..74a86b2 100644 --- a/msal/overview/msal-react.md +++ b/msal/overview/msal-react.md @@ -17,4 +17,4 @@ ms.author: dmwendia # Getting started with MSAL React -[!INCLUDE[MSAL React getting started](~/lib/msal-react/docs/getting-started.md)] \ No newline at end of file +[!INCLUDE[MSAL React getting started](~/microsoft-authentication-library-javascript/lib/msal-react/docs/getting-started.md)] \ No newline at end of file From 29868997e116f48028880e1f3caba03d2ec8679a Mon Sep 17 00:00:00 2001 From: Dickson Mwendia <64727760+Dickson-Mwendia@users.noreply.github.com> Date: Fri, 17 Mar 2023 13:09:40 +0300 Subject: [PATCH 04/47] try fixing include bug --- .openpublishing.publish.config.json | 2 +- msal/overview/msal-react.md | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.openpublishing.publish.config.json b/.openpublishing.publish.config.json index c7c752f..1c67334 100644 --- a/.openpublishing.publish.config.json +++ b/.openpublishing.publish.config.json @@ -51,7 +51,7 @@ "branch_mapping": {} }, { - "path_to_root": "microsoft-authentication-library-for-js", + "path_to_root": "lib", "url": "https://github.com/AzureAD/microsoft-authentication-library-for-js", "branch": "dev", "branch_mapping": {} diff --git a/msal/overview/msal-react.md b/msal/overview/msal-react.md index 74a86b2..6845510 100644 --- a/msal/overview/msal-react.md +++ b/msal/overview/msal-react.md @@ -17,4 +17,4 @@ ms.author: dmwendia # Getting started with MSAL React -[!INCLUDE[MSAL React getting started](~/microsoft-authentication-library-javascript/lib/msal-react/docs/getting-started.md)] \ No newline at end of file +[!INCLUDE[MSAL React getting started](~/msal-react/docs/getting-started.md)] \ No newline at end of file From 874174f46d294e357e99dab4a59155debcf353c6 Mon Sep 17 00:00:00 2001 From: Dickson Mwendia <64727760+Dickson-Mwendia@users.noreply.github.com> Date: Fri, 17 Mar 2023 13:18:18 +0300 Subject: [PATCH 05/47] comment out include and verify page gets built --- msal/docs-ref-toc/fxtoc.yml | 2 +- msal/overview/{msal-react.md => react-getting-started.md} | 7 ++++++- 2 files changed, 7 insertions(+), 2 deletions(-) rename msal/overview/{msal-react.md => react-getting-started.md} (93%) diff --git a/msal/docs-ref-toc/fxtoc.yml b/msal/docs-ref-toc/fxtoc.yml index 51377cf..854b557 100644 --- a/msal/docs-ref-toc/fxtoc.yml +++ b/msal/docs-ref-toc/fxtoc.yml @@ -2,6 +2,6 @@ uid: msal.sdk.landingPage.reference landingPageType: Root expanded: true - href: ~/overview/msal-react.md + href: ~/overview/react-getting-started.md children: - '**' \ No newline at end of file diff --git a/msal/overview/msal-react.md b/msal/overview/react-getting-started.md similarity index 93% rename from msal/overview/msal-react.md rename to msal/overview/react-getting-started.md index 6845510..e14e5ec 100644 --- a/msal/overview/msal-react.md +++ b/msal/overview/react-getting-started.md @@ -17,4 +17,9 @@ ms.author: dmwendia # Getting started with MSAL React -[!INCLUDE[MSAL React getting started](~/msal-react/docs/getting-started.md)] \ No newline at end of file + + From 6e89e404d8b4957182aa4308958a78ac04dae524 Mon Sep 17 00:00:00 2001 From: Dickson Mwendia <64727760+Dickson-Mwendia@users.noreply.github.com> Date: Fri, 17 Mar 2023 13:27:02 +0300 Subject: [PATCH 06/47] maybe this will work --- msal/overview/react-getting-started.md | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/msal/overview/react-getting-started.md b/msal/overview/react-getting-started.md index e14e5ec..9b19e14 100644 --- a/msal/overview/react-getting-started.md +++ b/msal/overview/react-getting-started.md @@ -23,3 +23,8 @@ ms.author: dmwendia --> +[Link to docs.md](https://github.com/AzureAD/microsoft-authentication-library-for-js/lib/msal-react/docs/getting-started.md) + + + +[!INCLUDE[MSAL React](https://github.com/AzureAD/microsoft-authentication-library-for-js/blob/dev/lib/msal-react/docs/getting-started.md)] From 7f31e7ea14a176be82b446aaac732a3e0454c40a Mon Sep 17 00:00:00 2001 From: Dickson Mwendia <64727760+Dickson-Mwendia@users.noreply.github.com> Date: Wed, 12 Apr 2023 21:53:02 +0300 Subject: [PATCH 07/47] update to msal browser --- msal/docs-ref-toc/fxtoc.yml | 8 +- msal/msal-browser/acquire-token.md | 116 +++++++++++++++++ msal/msal-browser/initialization.md | 27 ++++ msal/msal-browser/login-user.md | 165 +++++++++++++++++++++++++ msal/msal-browser/v1-migration.md | 127 +++++++++++++++++++ msal/msal-browser/v2-migration.md | 81 ++++++++++++ msal/overview/react-getting-started.md | 30 ----- 7 files changed, 522 insertions(+), 32 deletions(-) create mode 100644 msal/msal-browser/acquire-token.md create mode 100644 msal/msal-browser/initialization.md create mode 100644 msal/msal-browser/login-user.md create mode 100644 msal/msal-browser/v1-migration.md create mode 100644 msal/msal-browser/v2-migration.md delete mode 100644 msal/overview/react-getting-started.md diff --git a/msal/docs-ref-toc/fxtoc.yml b/msal/docs-ref-toc/fxtoc.yml index 854b557..aace33c 100644 --- a/msal/docs-ref-toc/fxtoc.yml +++ b/msal/docs-ref-toc/fxtoc.yml @@ -2,6 +2,10 @@ uid: msal.sdk.landingPage.reference landingPageType: Root expanded: true - href: ~/overview/react-getting-started.md + href: ~/overview/msal-overview.md children: - - '**' \ No newline at end of file + - '**' +- name: MSAL Browser + items: + - name: Initialization of MSAL + href: ~/msal-browser/initialization.md \ No newline at end of file diff --git a/msal/msal-browser/acquire-token.md b/msal/msal-browser/acquire-token.md new file mode 100644 index 0000000..3122960 --- /dev/null +++ b/msal/msal-browser/acquire-token.md @@ -0,0 +1,116 @@ +# Acquiring and Using an Access Token + +> :information_source: Before you start here, make sure you understand how to [initialize the application object](./initialization.md). It is also crucial to understand the relationship between [access tokens and resources](./resources-and-scopes.md). + +In MSAL, you can get access tokens for the APIs your app needs to call using the `acquireToken*` methods provided by the library. The `acquireToken*` methods abstract away the 2 steps involved in acquiring tokens with the [OAuth 2.0 authorization code flow](https://docs.microsoft.com/azure/active-directory/develop/v2-oauth2-auth-code-flow): + +1. make a request to Azure AD to obtain an `authorization code` +1. exchange that code for an [access token](https://docs.microsoft.com/azure/active-directory/develop/access-tokens) containing the user consented scopes + +You can read more about access tokens [here](https://docs.microsoft.com/azure/active-directory/develop/access-tokens). + +## Acquiring an Access Token + +### Choose an Interaction Type + +See [here](./initialization.md#choosing-an-interaction-type) if you are uncertain about the differences between `acquireTokenRedirect` and `acquireTokenPopup`. + +### Prepare the request object + +You must pass a request object to the `acquireToken*` APIs. This object allows you to use different parameters in the request. See [here](./request-response-object.md) for more information on the request object parameters. Scopes are required for all `acquireToken*` calls. + +### Check the cache + +MSAL uses a [cache](./caching.md) to store tokens based on specific parameters including scopes, resource and authority, and will retrieve the token from the cache when needed. It also can perform silent renewal of those tokens when they have expired. MSAL exposes this functionality through the `acquireTokenSilent` method. + +After you've logged in with one of the `ssoSilent` or `login*` APIs the cache will contain a set of ID, access and refresh tokens. Every time you need an access token you should call `acquireTokenSilent` and if this fails call an interactive API instead. `acquireTokenSilent` will look for a valid token in the cache, and if it is close to expiring or does not exist, will automatically try to refresh it for you using the cached refresh token. You can read more about using `acquireTokenSilent` [here](./token-lifetimes.md#token-renewal). + +#### Popup + +```javascript +var request = { + scopes: ["User.Read"], +}; + +msalInstance.acquireTokenSilent(request).then(tokenResponse => { + // Do something with the tokenResponse +}).catch(async (error) => { + if (error instanceof InteractionRequiredAuthError) { + // fallback to interaction when silent call fails + return msalInstance.acquireTokenPopup(request); + } + + // handle other errors +}) +``` + +#### Redirect + +```javascript +var request = { + scopes: ["User.Read"], +}; + +msalInstance.acquireTokenSilent(request).then(tokenResponse => { + // Do something with the tokenResponse +}).catch(error => { + if (error instanceof InteractionRequiredAuthError) { + // fallback to interaction when silent call fails + return msalInstance.acquireTokenRedirect(request) + } + + // handle other errors +}); +``` + +## Using the Access Token + +Once you have retrieved the access token, you must include it in the `Authorization` header as a [bearer token](https://www.rfc-editor.org/rfc/rfc6750) for the request to the resource you obtained the token for, as shown below: + +```JavaScript +var headers = new Headers(); +var bearer = "Bearer " + tokenResponse.accessToken; +headers.append("Authorization", bearer); +var options = { + method: "GET", + headers: headers +}; +var graphEndpoint = "https://graph.microsoft.com/v1.0/me"; + +fetch(graphEndpoint, options) + .then(resp => { + //do something with response + }); +``` + +## MSAL token acquisition best practices + +The following are best practices to acquire tokens with MSAL for avoiding errors, performance hits and usability issues. Certain scenarios may provide exceptions to these. + +### Use a single PublicClientApplication instance + +Instantiate one `PublicClientApplication` per application and use the same instance throughout your app. This ensures that there is a single source of truth for what MSAL is performing at any given time (see: [MSAL events](events.md)) and eliminates the chance of distinct app objects making parallel interactive requests or potential cache conflicts, which might break apps, reduce performance or hinder user experience. + +### Always wait for promises to resolve + +All MSAL `acquireToken*` as well as `login*` APIs perform asynchronous operations and return promises. You should always wait for these promises to resolve before doing any other tasks that depend on authentication state or tokens, such as rendering user information, calling a protected API or calling other MSAL APIs. + +### Attempt silent request first, then interactive + +When requesting tokens, always use `acquireTokenSilent` first, falling back to interactive token acquisition if needed (e.g., when the `InteractionRequiredAuthError` is thrown). + +Concurrent silent requests are permitted. If two or more silent requests are made concurrently, only one would go to the network (if needed), but all would receive the response, as long as those requests are for the same request parameters (e.g. scopes). + +Concurrent interactive requests are **not** permitted. If two or more interactive requests are made concurrently, only the first one will start an interaction, while the rest will fail with [interaction_in_progress](https://github.com/AzureAD/microsoft-authentication-library-for-js/blob/dev/lib/msal-browser/docs/errors.md#interaction_in_progress) error. We recommend getting familiar with this error and possible remedies to avoid running into it in your applications. + +### Make one token request per resource + +You can only request access tokens for one resource at a time (see [resources and scopes](resources-and-scopes.md)). If needed, you can ask user consent to scopes (permissions) required by more than one resource by using the `extraScopesToConsent` parameter in the request object. Access tokens for previously consented scopes can be acquired silently. + +## Next Steps + +- [Token lifetimes, expiration and renewal](./token-lifetimes.md). +- [Caching in MSAL](./caching.md) +- [Handling errors](./errors.md) +- [Working with B2C](./working-with-b2c.md) +- [Throttling](../../msal-common/docs/Throttling.md) diff --git a/msal/msal-browser/initialization.md b/msal/msal-browser/initialization.md new file mode 100644 index 0000000..19b935b --- /dev/null +++ b/msal/msal-browser/initialization.md @@ -0,0 +1,27 @@ +--- +title: MSAL Browser +description: Getting started with MSAL React +services: active-directory +author: Dickson-Mwendia +manager: CelesteDG + +ms.service: active-directory +ms.subservice: develop +ms.topic: reference +ms.workload: identity +ms.date: 04/12/2023 +ms.author: dmwendia +--- + + +# Getting started with MSAL Browser + + + + + +[!INCLUDE[MSAL Browser](https://github.com/AzureAD/microsoft-authentication-library-for-js/blob/dev/lib/msal-react/docs/getting-started.md)] diff --git a/msal/msal-browser/login-user.md b/msal/msal-browser/login-user.md new file mode 100644 index 0000000..72fddfb --- /dev/null +++ b/msal/msal-browser/login-user.md @@ -0,0 +1,165 @@ +# Login User + +Before you start here, make sure you understand how to [initialize the application object](./initialization.md). + +The login APIs in MSAL retrieve an `authorization code` which can be exchanged for an [ID token](https://docs.microsoft.com/azure/active-directory/develop/id-tokens) for a signed in user, while consenting scopes for an additional resource, and an [access token](https://docs.microsoft.com/azure/active-directory/develop/access-tokens) containing the user consented scopes to allow your app to securely call the API. + +You can read more about ID tokens on our [Azure Docs pages](https://docs.microsoft.com/azure/active-directory/develop/id-tokens). + +## Choosing an Interaction Type + +See [here](./initialization.md#choosing-an-interaction-type) if you are uncertain about the differences between `loginRedirect` and `loginPopup`. + +## Login the user + +You must pass a request object to the login APIs. This object allows you to use different parameters in the request. See [here](./request-response-object.md) for more information on the request object parameters. + +For login requests, all parameters are optional, so you can just send an empty object. + +- Popup +```javascript +try { + const loginResponse = await msalInstance.loginPopup({}); +} catch (err) { + // handle error +} +``` + +- Redirect +```javascript +try { + msalInstance.loginRedirect({}); +} catch (err) { + // handle error +} +``` + +Or you can send a set of [scopes](./request-response-object.md#scopes) to pre-consent to: +- Popup +```javascript +var loginRequest = { + scopes: ["user.read", "mail.send"] // optional Array +}; + +try { + const loginResponse = await msalInstance.loginPopup(loginRequest); +} catch (err) { + // handle error +} +``` + +- Redirect +```javascript +var loginRequest = { + scopes: ["user.read", "mail.send"] // optional Array +}; + +try { + msalInstance.loginRedirect(loginRequest); +} catch (err) { + // handle error +} +``` + +## Account APIs + +When a login call has succeeded, you can use the `getAllAccounts()` function to retrieve information about currently signed in users. +```javascript +const myAccounts: AccountInfo[] = msalInstance.getAllAccounts(); +``` + +If you know the account information, you can also retrieve the account information by using the `getAccountByUsername()` or `getAccountByHomeId()` APIs: +```javascript +const username = "test@contoso.com"; +const myAccount: AccountInfo = msalInstance.getAccountByUsername(username); + +const homeAccountId = "userid.hometenantid"; // Best to retrieve the homeAccountId from an account object previously obtained through msal +const myAccount: AccountInfo = maslInstance.getAccountByHomeId(homeAccountId); +``` + +**Note:** `getAccountByUsername()` is provided for convenience and should be considered less reliable than `getAccountByHomeId()`. When possible use `getAccountByHomeId()`. + +In B2C scenarios your B2C tenant will need to be configured to return the `emails` claim on `idTokens` in order to use the `getAccountByUsername()` API. + +These APIs will return an account object or an array of account objects with the following signature: +```javascript +{ + // home account identifier for this account object + homeAccountId: string; + // Entity who issued the token represented as a full host of it (e.g. login.microsoftonline.com) + environment: string; + // Full tenant or organizational id that this account belongs to + tenantId: string; + // preferred_username claim of the id_token that represents this account. + username: string; +}; +``` + +## Silent login with ssoSilent() + +If you already have a session that exists with the authentication server, you can use the ssoSilent() API to make requests for tokens without interaction. + +### With User Hint + +If you already have the user's sign-in information, you can pass this into the API to improve performance and ensure that the authorization server will look for the correct account session. You can pass one of the following into the request object in order to successfully obtain a token silently. + +It is recommended to leverage the [`login_hint` optional ID token claim](https://docs.microsoft.com/azure/active-directory/develop/active-directory-optional-claims#v10-and-v20-optional-claims-set) (provided to `ssoSilent` as `loginHint`), as it is the most reliable account hint of silent (and interactive) requests. + +- `account` (which can be retrieved using on of the [account APIs](./accounts.md)) +- `sid` (which can be retrieved from the `idTokenClaims` of an `account` object) +- `login_hint` (which can be retrieved from either the account object `login_hint` ID token claim, `username` property, or the `upn` ID token claim) + +Passing an account will look for the `login_hint` optional ID token claim (preferred), then the `sid` optional id token claim, then fall back to `loginHint` (if provided) or account username. + +```javascript +const silentRequest = { + scopes: ["User.Read", "Mail.Read"], + loginHint: "user@contoso.com" +}; + +try { + const loginResponse = await msalInstance.ssoSilent(silentRequest); +} catch (err) { + if (err instanceof InteractionRequiredAuthError) { + const loginResponse = await msalInstance.loginPopup(silentRequest).catch(error => { + // handle error + }); + } else { + // handle error + } +} +``` + +### Without User Hint + +If there is not enough information available about the user, you can attempt to use the `ssoSilent` API **without** passing an `account`, `sid` or `login_hint`. + +```javascript +const silentRequest = { + scopes: ["User.Read", "Mail.Read"] +}; +``` + +However, be aware that if your application has code paths for multiple users in a single browser session, or if the user has multiple accounts for that single browser session, then there is a higher likelihood of silent sign-in errors. You may see the following error show up in the event of multiple account sessions found by the authorization server: + +```txt +InteractionRequiredAuthError: interaction_required: AADSTS16000: Either multiple user identities are available for the current request or selected account is not supported for the scenario. +``` + +This indicates that the server could not determine which account to sign into, and will require either one of the parameters above (`account`, `login_hint`, `sid`) or an interactive sign-in to choose the account. + +## RedirectUri Considerations + +When using popup and silent APIs we recommend setting the `redirectUri` to a blank page or a page that does not implement MSAL. This will help prevent potential issues as well as improve performance. If your application is only using popup and silent APIs you can set this on the `PublicClientApplication` config. If your application also needs to support redirect APIs you can set the `redirectUri` on a per request basis: + +Note: This does not apply for `loginRedirect` or `acquireTokenRedirect`. When using those APIs please see the directions on handling redirects [here](./initialization#redirect-apis) + +```javascript +msalInstance.loginPopup({ + redirectUri: "http://localhost:3000/blank.html" +}); +``` + +# Next Steps + +Learn how to [acquire and use an access token](./acquire-token.md)! diff --git a/msal/msal-browser/v1-migration.md b/msal/msal-browser/v1-migration.md new file mode 100644 index 0000000..fb70086 --- /dev/null +++ b/msal/msal-browser/v1-migration.md @@ -0,0 +1,127 @@ +# Migrating from MSAL 1.x to MSAL 2.x + +If you are new to MSAL, you should start [here](./initialization.md). + +If you are coming from [MSAL v1.x](../../msal-common/), you can follow this guide to update your code to use [MSAL v2.x](../../msal-browser/). + +## 1. Update application registration + +Go to the Azure AD portal for your tenant and review the App Registrations. You can create a [new registration](https://docs.microsoft.com/en-us/azure/active-directory/develop/scenario-spa-app-registration#create-the-app-registration) for MSAL 2.x or you can [update your existing registration](https://docs.microsoft.com/en-us/azure/active-directory/develop/scenario-spa-app-registration#redirect-uri-msaljs-20-with-auth-code-flow) for the registration that you are using for MSAL 1.x. + +## 2. Add the msal-browser package to your project + +See the [installation section of the README](../README.md#installation). + +## 3. Update your code + +In MSAL 1.x, you created an application instance as below: + +```javascript +import * as msal from "msal"; + +const msalInstance = new msal.UserAgentApplication(config); +``` + +In MSAL 2.x, you can update this to use the new `PublicClientApplication` object. + +```javascript +import * as msal from "@azure/msal-browser"; + +const msalInstance = new msal.PublicClientApplication(config); +``` + +There may be some small differences in the configuration object that is passed in. If you are passing a more advanced configuration to the `UserAgentApplication` object, see [here](./configuration.md) for more information on new app object configuration options. + +Request and response object signatures have changed - `acquireTokenSilent` now has a separate object signature from the interactive APIs. Please see [here](./request-response-object.md) for more information on configuring the request APIs. + +Most APIs from MSAL 1.x have been carried forward to MSAL 2.x without change. Some functions have been removed: +- `handleRedirectCallback` +- `urlContainsHash` +- `getCurrentConfiguration` +- `getLoginInProgress` +- `getAccount` +- `getAccountState` +- `isCallback` + +In MSAL 2.x, handling the response from the hash is an asynchronous operation, as MSAL will perform a token exchange as soon as it parses the authorization code from the response. Because of this, when performing redirect calls, MSAL provides the `handleRedirectPromise` function which will return a promise that resolves when the redirect has been fully handled by MSAL. When using a redirect method, the page used as the `redirectUri` must implement `handleRedirectPromise` to ensure the response is handled and tokens are cached when returning from the redirect. + +```javascript +const myMSALObj = new msal.PublicClientApplication(msalConfig); + +// Register Callbacks for Redirect flow +myMSALObj.handleRedirectPromise().then((tokenResponse) => { + let accountObj = null; + if (tokenResponse !== null) { + accountObj = tokenResponse.account; + const id_token = tokenResponse.idToken; + const access_token = tokenResponse.accessToken; + } else { + const currentAccounts = myMSALObj.getAllAccounts(); + if (!currentAccounts || currentAccounts.length === 0) { + // No user signed in + return; + } else if (currentAccounts.length > 1) { + // More than one user signed in, find desired user with getAccountByUsername(username) + } else { + accountObj = currentAccounts[0]; + } + } + + const username = accountObj.username; + +}).catch((error) => { + handleError(error); +}); + +function signIn() { + myMSALObj.loginRedirect(loginRequest); +} + +async function getTokenRedirect(request) { + return await myMSALObj.acquireTokenSilent(request).catch(error => { + this.logger.info("silent token acquisition fails. acquiring token using redirect"); + // fallback to interaction when silent call fails + return myMSALObj.acquireTokenRedirect(request) + }); +} +``` + +During `loginPopup`, `acquireTokenPopup`, or `acquireTokenSilent` calls, you can wait for the promise to resolve. + +```javascript +const myMSALObj = new msal.PublicClientApplication(msalConfig); + +async function signIn(method) { + try { + const loginResponse = await myMSALObj.loginPopup(loginRequest); + } catch (err) { + handleError(error); + } + + const currentAccounts = myMSALObj.getAllAccounts(); + if (!currentAccounts || currentAccounts.length === 0) { + // No user signed in + return; + } else if (currentAccounts.length > 1) { + // More than one user signed in, find desired user with getAccountByUsername(username) + } else { + accountObj = currentAccounts[0]; + } +} + +async function getTokenPopup(request) { + return await myMSALObj.acquireTokenSilent(request).catch(async (error) => { + this.logger.info("silent token acquisition fails. acquiring token using popup"); + // fallback to interaction when silent call fails + return await myMSALObj.acquireTokenPopup(request).catch(error => { + handleError(error); + }); + }); +} +``` + +Please see the [login](./login-user.md) and [acquire token](./acquire-token.md) docs for more detailed information on usage. + +Refresh tokens are now returned as part of the token responses, and are used by the library to renew access tokens without interaction or the use of iframes. See the [token lifetimes docs](./token-lifetimes.md) for more information on renewing tokens. + +All other APIs should work as before. It is recommended to take a look at the [default sample](../../../samples/msal-browser-samples/VanillaJSTestApp2.0) to see a working example of MSAL 2.0. diff --git a/msal/msal-browser/v2-migration.md b/msal/msal-browser/v2-migration.md new file mode 100644 index 0000000..98aa16d --- /dev/null +++ b/msal/msal-browser/v2-migration.md @@ -0,0 +1,81 @@ +# Migrating from MSAL 2.x to MSAL 3.x + +If you are new to MSAL, you should start [here](initialization.md). + +If you are coming from [MSAL v1.x](../../msal-core/), you should check [this guide](v1-migration.md) first to migrate to [MSAL v2.x](../../msal-browser/) and then follow next steps. + +If you are coming from [MSAL v2.x](../../msal-browser/), you can follow this guide to update your code to use [MSAL v3.x](../../msal-browser/). + +## Update your code + +In MSAL v2.x, you created an application instance as below: + +```javascript +import * as msal from "@azure/msal-browser"; + +const msalConfig = { + auth: { + clientId: 'your_client_id' + } +}; + +const msalInstance = new msal.PublicClientApplication(msalConfig); +``` + +In MSAL v3.x, you must initialize the application object as well. There are several options at your disposal: + +### Option 1 + +Instantiate a `PublicClientApplication` object and initialize it afterwards. The `initialize` function is asynchronous and must resolve before invoking other MSAL.js APIs. + +```javascript +import * as msal from "@azure/msal-browser"; + +const msalConfig = { + auth: { + clientId: 'your_client_id' + } +}; + +const msalInstance = new msal.PublicClientApplication(msalConfig); +await msalInstance.initialize(); +``` + +### Option 2 + +Invoke the `createPublicClientApplication` static method which returns an initialized `PublicClientApplication` object. Note that this function is asynchronous. + +```javascript +import * as msal from "@azure/msal-browser"; + +const msalConfig = { + auth: { + clientId: 'your_client_id' + } +}; + +const msalInstance = await msal.PublicClientApplication.createPublicClientApplication(msalConfig); +``` + +All other APIs are backward compatible with [MSAL v2.x](../../msal-browser/). It is recommended to take a look at the [default sample](../../../samples/msal-browser-samples/VanillaJSTestApp2.0) to see a working example of MSAL v3.0. + +## Key changes + +### Browser support + +MSAL.js no longer supports the following browsers: + +- IE 11 +- Edge (Legacy) + +### Package dependencies + +Typescript version was bumped from `3.8.3` to `4.9.5`. + +### Compiler options + +Module/target versions were bumped from `es6`/`es5` to `es2020`/`es2020` respectively. + +### CDN + +MSAL.js is no longer hosted on a CDN. Check [this doc](cdn-usage.md) for more details. diff --git a/msal/overview/react-getting-started.md b/msal/overview/react-getting-started.md deleted file mode 100644 index 9b19e14..0000000 --- a/msal/overview/react-getting-started.md +++ /dev/null @@ -1,30 +0,0 @@ ---- -title: MSAL React -description: Getting started with MSAL React -services: active-directory -author: Dickson-Mwendia -manager: CelesteDG - -ms.service: active-directory -ms.subservice: develop -ms.topic: reference -ms.workload: identity -ms.date: 01/10/2023 -ms.author: dmwendia ---- - - -# Getting started with MSAL React - - - - -[Link to docs.md](https://github.com/AzureAD/microsoft-authentication-library-for-js/lib/msal-react/docs/getting-started.md) - - - -[!INCLUDE[MSAL React](https://github.com/AzureAD/microsoft-authentication-library-for-js/blob/dev/lib/msal-react/docs/getting-started.md)] From 989a758457f2fc23f0f26b26cf1a2bc599fe172c Mon Sep 17 00:00:00 2001 From: Dickson Mwendia <64727760+Dickson-Mwendia@users.noreply.github.com> Date: Wed, 12 Apr 2023 22:37:04 +0300 Subject: [PATCH 08/47] updates to fusion toc entries --- .openpublishing.publish.config.json | 2 +- msal/docfx.json | 7 +++++-- msal/docs-ref-toc/{fxtoc.yml => TOC.yml} | 0 3 files changed, 6 insertions(+), 3 deletions(-) rename msal/docs-ref-toc/{fxtoc.yml => TOC.yml} (100%) diff --git a/.openpublishing.publish.config.json b/.openpublishing.publish.config.json index 63868f7..6e868ba 100644 --- a/.openpublishing.publish.config.json +++ b/.openpublishing.publish.config.json @@ -54,7 +54,7 @@ "skip_source_output_uploading": false, "JoinTOCPlugin": [ { - "TopLevelTOC": "msal/docs-ref-toc/fxtoc.yml", + "TopLevelTOC": "msal/docs-ref-toc/TOC.yml", "ReferenceTOC": "msal/docs-ref-autogen/toc.yml", "ReferenceTOCUrl": "/javascript/api/microsoft-authentication-library-js/toc.json?view=msal-js-latest", "ConceptualTOCUrl": "/microsoft-authentication-library-js/toc.json", diff --git a/msal/docfx.json b/msal/docfx.json index 049d89d..3da4361 100644 --- a/msal/docfx.json +++ b/msal/docfx.json @@ -44,8 +44,11 @@ "files": [ "**/*.md" ], - "src": "overview", - "dest": "api/overview", + "src": [ + "overview", + "msal-browser" + ], + "dest": "api", "exclude": [], "version": "msal-js-latest" }, diff --git a/msal/docs-ref-toc/fxtoc.yml b/msal/docs-ref-toc/TOC.yml similarity index 100% rename from msal/docs-ref-toc/fxtoc.yml rename to msal/docs-ref-toc/TOC.yml From 16a6608789ce97e42597f969a722f0709cdeaa3d Mon Sep 17 00:00:00 2001 From: Dickson Mwendia <64727760+Dickson-Mwendia@users.noreply.github.com> Date: Wed, 12 Apr 2023 22:51:08 +0300 Subject: [PATCH 09/47] updates TOC structure --- msal/docfx.json | 5 +---- msal/docs-ref-toc/TOC.yml | 14 +++++++------- msal/{overview => msal}/PackageStructure.png | Bin .../browser}/acquire-token.md | 0 .../browser}/initialization.md | 0 msal/{msal-browser => msal/browser}/login-user.md | 0 .../browser}/v1-migration.md | 0 .../browser}/v2-migration.md | 0 msal/{overview => msal}/msal-overview.md | 0 9 files changed, 8 insertions(+), 11 deletions(-) rename msal/{overview => msal}/PackageStructure.png (100%) rename msal/{msal-browser => msal/browser}/acquire-token.md (100%) rename msal/{msal-browser => msal/browser}/initialization.md (100%) rename msal/{msal-browser => msal/browser}/login-user.md (100%) rename msal/{msal-browser => msal/browser}/v1-migration.md (100%) rename msal/{msal-browser => msal/browser}/v2-migration.md (100%) rename msal/{overview => msal}/msal-overview.md (100%) diff --git a/msal/docfx.json b/msal/docfx.json index 3da4361..c4da2b5 100644 --- a/msal/docfx.json +++ b/msal/docfx.json @@ -44,10 +44,7 @@ "files": [ "**/*.md" ], - "src": [ - "overview", - "msal-browser" - ], + "src": "msal", "dest": "api", "exclude": [], "version": "msal-js-latest" diff --git a/msal/docs-ref-toc/TOC.yml b/msal/docs-ref-toc/TOC.yml index aace33c..5f30444 100644 --- a/msal/docs-ref-toc/TOC.yml +++ b/msal/docs-ref-toc/TOC.yml @@ -1,11 +1,11 @@ -- name: SDK reference - uid: msal.sdk.landingPage.reference - landingPageType: Root +- name: MSAL.js Overview expanded: true - href: ~/overview/msal-overview.md - children: - - '**' + href: ~/msal/msal-overview.md - name: MSAL Browser items: - name: Initialization of MSAL - href: ~/msal-browser/initialization.md \ No newline at end of file + href: ~/msal/browser/initialization.md + - name: Sign in users + href: ~/msal/browser/login-user.md + - name: Acquire tokens + href: ~/msal/browser/acquire-token.md \ No newline at end of file diff --git a/msal/overview/PackageStructure.png b/msal/msal/PackageStructure.png similarity index 100% rename from msal/overview/PackageStructure.png rename to msal/msal/PackageStructure.png diff --git a/msal/msal-browser/acquire-token.md b/msal/msal/browser/acquire-token.md similarity index 100% rename from msal/msal-browser/acquire-token.md rename to msal/msal/browser/acquire-token.md diff --git a/msal/msal-browser/initialization.md b/msal/msal/browser/initialization.md similarity index 100% rename from msal/msal-browser/initialization.md rename to msal/msal/browser/initialization.md diff --git a/msal/msal-browser/login-user.md b/msal/msal/browser/login-user.md similarity index 100% rename from msal/msal-browser/login-user.md rename to msal/msal/browser/login-user.md diff --git a/msal/msal-browser/v1-migration.md b/msal/msal/browser/v1-migration.md similarity index 100% rename from msal/msal-browser/v1-migration.md rename to msal/msal/browser/v1-migration.md diff --git a/msal/msal-browser/v2-migration.md b/msal/msal/browser/v2-migration.md similarity index 100% rename from msal/msal-browser/v2-migration.md rename to msal/msal/browser/v2-migration.md diff --git a/msal/overview/msal-overview.md b/msal/msal/msal-overview.md similarity index 100% rename from msal/overview/msal-overview.md rename to msal/msal/msal-overview.md From 856ff0c5ffab89ba13640115e76f0f03ee3a038e Mon Sep 17 00:00:00 2001 From: Dickson Mwendia <64727760+Dickson-Mwendia@users.noreply.github.com> Date: Wed, 12 Apr 2023 23:00:16 +0300 Subject: [PATCH 10/47] update TOC schema --- .openpublishing.publish.config.json | 2 +- msal-javascript-conceptual/index.md | 8 ++++++++ msal/docs-ref-toc/{TOC.yml => fxtoc.yml} | 0 3 files changed, 9 insertions(+), 1 deletion(-) rename msal/docs-ref-toc/{TOC.yml => fxtoc.yml} (100%) diff --git a/.openpublishing.publish.config.json b/.openpublishing.publish.config.json index 6e868ba..63868f7 100644 --- a/.openpublishing.publish.config.json +++ b/.openpublishing.publish.config.json @@ -54,7 +54,7 @@ "skip_source_output_uploading": false, "JoinTOCPlugin": [ { - "TopLevelTOC": "msal/docs-ref-toc/TOC.yml", + "TopLevelTOC": "msal/docs-ref-toc/fxtoc.yml", "ReferenceTOC": "msal/docs-ref-autogen/toc.yml", "ReferenceTOCUrl": "/javascript/api/microsoft-authentication-library-js/toc.json?view=msal-js-latest", "ConceptualTOCUrl": "/microsoft-authentication-library-js/toc.json", diff --git a/msal-javascript-conceptual/index.md b/msal-javascript-conceptual/index.md index 04c787d..42dc4db 100644 --- a/msal-javascript-conceptual/index.md +++ b/msal-javascript-conceptual/index.md @@ -1 +1,9 @@ +--- +author: Dickson-Mwendia +ms.service: active-directory +ms.topic: include +ms.date: 04/12/2023 +ms.author: dmwendia +--- + # Welcome to msal-javascript-conceptual! \ No newline at end of file diff --git a/msal/docs-ref-toc/TOC.yml b/msal/docs-ref-toc/fxtoc.yml similarity index 100% rename from msal/docs-ref-toc/TOC.yml rename to msal/docs-ref-toc/fxtoc.yml From 05273032362049400f87ab3143a73450b7ced210 Mon Sep 17 00:00:00 2001 From: Dickson Mwendia <64727760+Dickson-Mwendia@users.noreply.github.com> Date: Wed, 12 Apr 2023 23:23:48 +0300 Subject: [PATCH 11/47] update dependent repo --- .openpublishing.publish.config.json | 14 +++----------- 1 file changed, 3 insertions(+), 11 deletions(-) diff --git a/.openpublishing.publish.config.json b/.openpublishing.publish.config.json index 63868f7..1ae10fd 100644 --- a/.openpublishing.publish.config.json +++ b/.openpublishing.publish.config.json @@ -41,20 +41,12 @@ "sync_notification_subscribers": [], "branches_to_filter": [], "need_preview_pull_request": true, - "dependent_repositories": [ - { - "path_to_root": "_themes", - "url": "https://github.com/Microsoft/templates.docs.msft", - "branch": "main", - "branch_mapping": {} - } - ], "branch_target_mapping": {}, "docs_build_engine": {}, "skip_source_output_uploading": false, "JoinTOCPlugin": [ { - "TopLevelTOC": "msal/docs-ref-toc/fxtoc.yml", + "TopLevelTOC": "msal/docs-ref-toc/.yml", "ReferenceTOC": "msal/docs-ref-autogen/toc.yml", "ReferenceTOCUrl": "/javascript/api/microsoft-authentication-library-js/toc.json?view=msal-js-latest", "ConceptualTOCUrl": "/microsoft-authentication-library-js/toc.json", @@ -76,8 +68,8 @@ }, { "path_to_root": "lib", - "url": "https://github.com/AzureAD/microsoft-authentication-library-for-js", - "branch": "dev", + "url": "https://github.com/Dickson-Mwendia/microsoft-authentication-library-for-js", + "branch": "cross-repo-references-metadata", "branch_mapping": {} } ], From 99bdb29d31d0aa7bd359ea0f6e87c87f6bcc093b Mon Sep 17 00:00:00 2001 From: Dickson Mwendia <64727760+Dickson-Mwendia@users.noreply.github.com> Date: Wed, 12 Apr 2023 23:30:35 +0300 Subject: [PATCH 12/47] update path to includes --- msal/msal/browser/initialization.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/msal/msal/browser/initialization.md b/msal/msal/browser/initialization.md index 19b935b..68614b9 100644 --- a/msal/msal/browser/initialization.md +++ b/msal/msal/browser/initialization.md @@ -24,4 +24,4 @@ ms.author: dmwendia --> -[!INCLUDE[MSAL Browser](https://github.com/AzureAD/microsoft-authentication-library-for-js/blob/dev/lib/msal-react/docs/getting-started.md)] +[!INCLUDE[MSAL Browser](~/lib/msal-browser/docs/includes/initialization.md)] From 646d95b14eaa6396268cd421f6a7eb7eb3ce40c2 Mon Sep 17 00:00:00 2001 From: Dickson Mwendia <64727760+Dickson-Mwendia@users.noreply.github.com> Date: Wed, 12 Apr 2023 23:48:17 +0300 Subject: [PATCH 13/47] update includes --- msal/msal/browser/acquire-token.md | 132 +++----------------- msal/msal/browser/initialization.md | 2 +- msal/msal/browser/login-user.md | 181 +++------------------------- 3 files changed, 33 insertions(+), 282 deletions(-) diff --git a/msal/msal/browser/acquire-token.md b/msal/msal/browser/acquire-token.md index 3122960..c2c7976 100644 --- a/msal/msal/browser/acquire-token.md +++ b/msal/msal/browser/acquire-token.md @@ -1,116 +1,16 @@ -# Acquiring and Using an Access Token - -> :information_source: Before you start here, make sure you understand how to [initialize the application object](./initialization.md). It is also crucial to understand the relationship between [access tokens and resources](./resources-and-scopes.md). - -In MSAL, you can get access tokens for the APIs your app needs to call using the `acquireToken*` methods provided by the library. The `acquireToken*` methods abstract away the 2 steps involved in acquiring tokens with the [OAuth 2.0 authorization code flow](https://docs.microsoft.com/azure/active-directory/develop/v2-oauth2-auth-code-flow): - -1. make a request to Azure AD to obtain an `authorization code` -1. exchange that code for an [access token](https://docs.microsoft.com/azure/active-directory/develop/access-tokens) containing the user consented scopes - -You can read more about access tokens [here](https://docs.microsoft.com/azure/active-directory/develop/access-tokens). - -## Acquiring an Access Token - -### Choose an Interaction Type - -See [here](./initialization.md#choosing-an-interaction-type) if you are uncertain about the differences between `acquireTokenRedirect` and `acquireTokenPopup`. - -### Prepare the request object - -You must pass a request object to the `acquireToken*` APIs. This object allows you to use different parameters in the request. See [here](./request-response-object.md) for more information on the request object parameters. Scopes are required for all `acquireToken*` calls. - -### Check the cache - -MSAL uses a [cache](./caching.md) to store tokens based on specific parameters including scopes, resource and authority, and will retrieve the token from the cache when needed. It also can perform silent renewal of those tokens when they have expired. MSAL exposes this functionality through the `acquireTokenSilent` method. - -After you've logged in with one of the `ssoSilent` or `login*` APIs the cache will contain a set of ID, access and refresh tokens. Every time you need an access token you should call `acquireTokenSilent` and if this fails call an interactive API instead. `acquireTokenSilent` will look for a valid token in the cache, and if it is close to expiring or does not exist, will automatically try to refresh it for you using the cached refresh token. You can read more about using `acquireTokenSilent` [here](./token-lifetimes.md#token-renewal). - -#### Popup - -```javascript -var request = { - scopes: ["User.Read"], -}; - -msalInstance.acquireTokenSilent(request).then(tokenResponse => { - // Do something with the tokenResponse -}).catch(async (error) => { - if (error instanceof InteractionRequiredAuthError) { - // fallback to interaction when silent call fails - return msalInstance.acquireTokenPopup(request); - } - - // handle other errors -}) -``` - -#### Redirect - -```javascript -var request = { - scopes: ["User.Read"], -}; - -msalInstance.acquireTokenSilent(request).then(tokenResponse => { - // Do something with the tokenResponse -}).catch(error => { - if (error instanceof InteractionRequiredAuthError) { - // fallback to interaction when silent call fails - return msalInstance.acquireTokenRedirect(request) - } - - // handle other errors -}); -``` - -## Using the Access Token - -Once you have retrieved the access token, you must include it in the `Authorization` header as a [bearer token](https://www.rfc-editor.org/rfc/rfc6750) for the request to the resource you obtained the token for, as shown below: - -```JavaScript -var headers = new Headers(); -var bearer = "Bearer " + tokenResponse.accessToken; -headers.append("Authorization", bearer); -var options = { - method: "GET", - headers: headers -}; -var graphEndpoint = "https://graph.microsoft.com/v1.0/me"; - -fetch(graphEndpoint, options) - .then(resp => { - //do something with response - }); -``` - -## MSAL token acquisition best practices - -The following are best practices to acquire tokens with MSAL for avoiding errors, performance hits and usability issues. Certain scenarios may provide exceptions to these. - -### Use a single PublicClientApplication instance - -Instantiate one `PublicClientApplication` per application and use the same instance throughout your app. This ensures that there is a single source of truth for what MSAL is performing at any given time (see: [MSAL events](events.md)) and eliminates the chance of distinct app objects making parallel interactive requests or potential cache conflicts, which might break apps, reduce performance or hinder user experience. - -### Always wait for promises to resolve - -All MSAL `acquireToken*` as well as `login*` APIs perform asynchronous operations and return promises. You should always wait for these promises to resolve before doing any other tasks that depend on authentication state or tokens, such as rendering user information, calling a protected API or calling other MSAL APIs. - -### Attempt silent request first, then interactive - -When requesting tokens, always use `acquireTokenSilent` first, falling back to interactive token acquisition if needed (e.g., when the `InteractionRequiredAuthError` is thrown). - -Concurrent silent requests are permitted. If two or more silent requests are made concurrently, only one would go to the network (if needed), but all would receive the response, as long as those requests are for the same request parameters (e.g. scopes). - -Concurrent interactive requests are **not** permitted. If two or more interactive requests are made concurrently, only the first one will start an interaction, while the rest will fail with [interaction_in_progress](https://github.com/AzureAD/microsoft-authentication-library-for-js/blob/dev/lib/msal-browser/docs/errors.md#interaction_in_progress) error. We recommend getting familiar with this error and possible remedies to avoid running into it in your applications. - -### Make one token request per resource - -You can only request access tokens for one resource at a time (see [resources and scopes](resources-and-scopes.md)). If needed, you can ask user consent to scopes (permissions) required by more than one resource by using the `extraScopesToConsent` parameter in the request object. Access tokens for previously consented scopes can be acquired silently. - -## Next Steps - -- [Token lifetimes, expiration and renewal](./token-lifetimes.md). -- [Caching in MSAL](./caching.md) -- [Handling errors](./errors.md) -- [Working with B2C](./working-with-b2c.md) -- [Throttling](../../msal-common/docs/Throttling.md) +--- +title: Acquire tokens in MSAL Browser +description: Acquire tokens in MSAL Browser +services: active-directory +author: Dickson-Mwendia +manager: CelesteDG + +ms.service: active-directory +ms.subservice: develop +ms.topic: reference +ms.workload: identity +ms.date: 04/12/2023 +ms.author: dmwendia +--- + +[!INCLUDE[MSAL Browser](~//msal-browser/docs/includes/acquire-token.md)] \ No newline at end of file diff --git a/msal/msal/browser/initialization.md b/msal/msal/browser/initialization.md index 68614b9..5cd7dbc 100644 --- a/msal/msal/browser/initialization.md +++ b/msal/msal/browser/initialization.md @@ -1,6 +1,6 @@ --- title: MSAL Browser -description: Getting started with MSAL React +description: Getting started with MSAL Browser services: active-directory author: Dickson-Mwendia manager: CelesteDG diff --git a/msal/msal/browser/login-user.md b/msal/msal/browser/login-user.md index 72fddfb..55bb5a3 100644 --- a/msal/msal/browser/login-user.md +++ b/msal/msal/browser/login-user.md @@ -1,165 +1,16 @@ -# Login User - -Before you start here, make sure you understand how to [initialize the application object](./initialization.md). - -The login APIs in MSAL retrieve an `authorization code` which can be exchanged for an [ID token](https://docs.microsoft.com/azure/active-directory/develop/id-tokens) for a signed in user, while consenting scopes for an additional resource, and an [access token](https://docs.microsoft.com/azure/active-directory/develop/access-tokens) containing the user consented scopes to allow your app to securely call the API. - -You can read more about ID tokens on our [Azure Docs pages](https://docs.microsoft.com/azure/active-directory/develop/id-tokens). - -## Choosing an Interaction Type - -See [here](./initialization.md#choosing-an-interaction-type) if you are uncertain about the differences between `loginRedirect` and `loginPopup`. - -## Login the user - -You must pass a request object to the login APIs. This object allows you to use different parameters in the request. See [here](./request-response-object.md) for more information on the request object parameters. - -For login requests, all parameters are optional, so you can just send an empty object. - -- Popup -```javascript -try { - const loginResponse = await msalInstance.loginPopup({}); -} catch (err) { - // handle error -} -``` - -- Redirect -```javascript -try { - msalInstance.loginRedirect({}); -} catch (err) { - // handle error -} -``` - -Or you can send a set of [scopes](./request-response-object.md#scopes) to pre-consent to: -- Popup -```javascript -var loginRequest = { - scopes: ["user.read", "mail.send"] // optional Array -}; - -try { - const loginResponse = await msalInstance.loginPopup(loginRequest); -} catch (err) { - // handle error -} -``` - -- Redirect -```javascript -var loginRequest = { - scopes: ["user.read", "mail.send"] // optional Array -}; - -try { - msalInstance.loginRedirect(loginRequest); -} catch (err) { - // handle error -} -``` - -## Account APIs - -When a login call has succeeded, you can use the `getAllAccounts()` function to retrieve information about currently signed in users. -```javascript -const myAccounts: AccountInfo[] = msalInstance.getAllAccounts(); -``` - -If you know the account information, you can also retrieve the account information by using the `getAccountByUsername()` or `getAccountByHomeId()` APIs: -```javascript -const username = "test@contoso.com"; -const myAccount: AccountInfo = msalInstance.getAccountByUsername(username); - -const homeAccountId = "userid.hometenantid"; // Best to retrieve the homeAccountId from an account object previously obtained through msal -const myAccount: AccountInfo = maslInstance.getAccountByHomeId(homeAccountId); -``` - -**Note:** `getAccountByUsername()` is provided for convenience and should be considered less reliable than `getAccountByHomeId()`. When possible use `getAccountByHomeId()`. - -In B2C scenarios your B2C tenant will need to be configured to return the `emails` claim on `idTokens` in order to use the `getAccountByUsername()` API. - -These APIs will return an account object or an array of account objects with the following signature: -```javascript -{ - // home account identifier for this account object - homeAccountId: string; - // Entity who issued the token represented as a full host of it (e.g. login.microsoftonline.com) - environment: string; - // Full tenant or organizational id that this account belongs to - tenantId: string; - // preferred_username claim of the id_token that represents this account. - username: string; -}; -``` - -## Silent login with ssoSilent() - -If you already have a session that exists with the authentication server, you can use the ssoSilent() API to make requests for tokens without interaction. - -### With User Hint - -If you already have the user's sign-in information, you can pass this into the API to improve performance and ensure that the authorization server will look for the correct account session. You can pass one of the following into the request object in order to successfully obtain a token silently. - -It is recommended to leverage the [`login_hint` optional ID token claim](https://docs.microsoft.com/azure/active-directory/develop/active-directory-optional-claims#v10-and-v20-optional-claims-set) (provided to `ssoSilent` as `loginHint`), as it is the most reliable account hint of silent (and interactive) requests. - -- `account` (which can be retrieved using on of the [account APIs](./accounts.md)) -- `sid` (which can be retrieved from the `idTokenClaims` of an `account` object) -- `login_hint` (which can be retrieved from either the account object `login_hint` ID token claim, `username` property, or the `upn` ID token claim) - -Passing an account will look for the `login_hint` optional ID token claim (preferred), then the `sid` optional id token claim, then fall back to `loginHint` (if provided) or account username. - -```javascript -const silentRequest = { - scopes: ["User.Read", "Mail.Read"], - loginHint: "user@contoso.com" -}; - -try { - const loginResponse = await msalInstance.ssoSilent(silentRequest); -} catch (err) { - if (err instanceof InteractionRequiredAuthError) { - const loginResponse = await msalInstance.loginPopup(silentRequest).catch(error => { - // handle error - }); - } else { - // handle error - } -} -``` - -### Without User Hint - -If there is not enough information available about the user, you can attempt to use the `ssoSilent` API **without** passing an `account`, `sid` or `login_hint`. - -```javascript -const silentRequest = { - scopes: ["User.Read", "Mail.Read"] -}; -``` - -However, be aware that if your application has code paths for multiple users in a single browser session, or if the user has multiple accounts for that single browser session, then there is a higher likelihood of silent sign-in errors. You may see the following error show up in the event of multiple account sessions found by the authorization server: - -```txt -InteractionRequiredAuthError: interaction_required: AADSTS16000: Either multiple user identities are available for the current request or selected account is not supported for the scenario. -``` - -This indicates that the server could not determine which account to sign into, and will require either one of the parameters above (`account`, `login_hint`, `sid`) or an interactive sign-in to choose the account. - -## RedirectUri Considerations - -When using popup and silent APIs we recommend setting the `redirectUri` to a blank page or a page that does not implement MSAL. This will help prevent potential issues as well as improve performance. If your application is only using popup and silent APIs you can set this on the `PublicClientApplication` config. If your application also needs to support redirect APIs you can set the `redirectUri` on a per request basis: - -Note: This does not apply for `loginRedirect` or `acquireTokenRedirect`. When using those APIs please see the directions on handling redirects [here](./initialization#redirect-apis) - -```javascript -msalInstance.loginPopup({ - redirectUri: "http://localhost:3000/blank.html" -}); -``` - -# Next Steps - -Learn how to [acquire and use an access token](./acquire-token.md)! +--- +title: Sign in users in MSAL Browser +description: Sign in users in MSAL Browser +services: active-directory +author: Dickson-Mwendia +manager: CelesteDG + +ms.service: active-directory +ms.subservice: develop +ms.topic: reference +ms.workload: identity +ms.date: 04/12/2023 +ms.author: dmwendia +--- + +[!INCLUDE[Sign in users](~/msal-browser/docs/includes/login-user.md)] \ No newline at end of file From b16ca95be85ab83b21eb3c0d3ff68ec5ab003124 Mon Sep 17 00:00:00 2001 From: Dickson Mwendia <64727760+Dickson-Mwendia@users.noreply.github.com> Date: Thu, 13 Apr 2023 00:07:19 +0300 Subject: [PATCH 14/47] update include pathys --- .openpublishing.publish.config.json | 2 +- msal/msal/browser/acquire-token.md | 2 +- msal/msal/browser/login-user.md | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.openpublishing.publish.config.json b/.openpublishing.publish.config.json index 1ae10fd..afd36b2 100644 --- a/.openpublishing.publish.config.json +++ b/.openpublishing.publish.config.json @@ -67,7 +67,7 @@ "branch_mapping": {} }, { - "path_to_root": "lib", + "path_to_root": "microsoft-authentication-library-for-js", "url": "https://github.com/Dickson-Mwendia/microsoft-authentication-library-for-js", "branch": "cross-repo-references-metadata", "branch_mapping": {} diff --git a/msal/msal/browser/acquire-token.md b/msal/msal/browser/acquire-token.md index c2c7976..8f63df4 100644 --- a/msal/msal/browser/acquire-token.md +++ b/msal/msal/browser/acquire-token.md @@ -13,4 +13,4 @@ ms.date: 04/12/2023 ms.author: dmwendia --- -[!INCLUDE[MSAL Browser](~//msal-browser/docs/includes/acquire-token.md)] \ No newline at end of file +[!INCLUDE[MSAL Browser](~/lib/msal-browser/docs/includes/acquire-token.md)] \ No newline at end of file diff --git a/msal/msal/browser/login-user.md b/msal/msal/browser/login-user.md index 55bb5a3..2d2bad3 100644 --- a/msal/msal/browser/login-user.md +++ b/msal/msal/browser/login-user.md @@ -13,4 +13,4 @@ ms.date: 04/12/2023 ms.author: dmwendia --- -[!INCLUDE[Sign in users](~/msal-browser/docs/includes/login-user.md)] \ No newline at end of file +[!INCLUDE[Sign in users](~/microsoft-authentication-library-for-js/lib/msal-browser/docs/includes/login-user.md)] \ No newline at end of file From fde1c6942823af97ac2fbc3b12325e9a76c7838d Mon Sep 17 00:00:00 2001 From: Dickson Mwendia <64727760+Dickson-Mwendia@users.noreply.github.com> Date: Thu, 13 Apr 2023 16:59:46 +0300 Subject: [PATCH 15/47] test crr --- .openpublishing.publish.config.json | 2 +- msal/msal/browser/acquire-token.md | 2 +- msal/msal/browser/initialization.md | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.openpublishing.publish.config.json b/.openpublishing.publish.config.json index afd36b2..1ae10fd 100644 --- a/.openpublishing.publish.config.json +++ b/.openpublishing.publish.config.json @@ -67,7 +67,7 @@ "branch_mapping": {} }, { - "path_to_root": "microsoft-authentication-library-for-js", + "path_to_root": "lib", "url": "https://github.com/Dickson-Mwendia/microsoft-authentication-library-for-js", "branch": "cross-repo-references-metadata", "branch_mapping": {} diff --git a/msal/msal/browser/acquire-token.md b/msal/msal/browser/acquire-token.md index 8f63df4..b51b6ff 100644 --- a/msal/msal/browser/acquire-token.md +++ b/msal/msal/browser/acquire-token.md @@ -13,4 +13,4 @@ ms.date: 04/12/2023 ms.author: dmwendia --- -[!INCLUDE[MSAL Browser](~/lib/msal-browser/docs/includes/acquire-token.md)] \ No newline at end of file +[!INCLUDE[MSAL Browser token acquisition](~/msal-browser/docs/includes/acquire-token.md)] \ No newline at end of file diff --git a/msal/msal/browser/initialization.md b/msal/msal/browser/initialization.md index 5cd7dbc..a5ca8a9 100644 --- a/msal/msal/browser/initialization.md +++ b/msal/msal/browser/initialization.md @@ -24,4 +24,4 @@ ms.author: dmwendia --> -[!INCLUDE[MSAL Browser](~/lib/msal-browser/docs/includes/initialization.md)] +[!INCLUDE[MSAL Browser initialization](~/lib/msal-browser/docs/includes/initialization.md)] From 15c3abee568fdbd8cf572cfef8ef287ad94a45ee Mon Sep 17 00:00:00 2001 From: Dickson Mwendia <64727760+Dickson-Mwendia@users.noreply.github.com> Date: Fri, 14 Apr 2023 09:57:23 +0300 Subject: [PATCH 16/47] update includes syntax --- msal/msal/browser/acquire-token.md | 2 +- msal/msal/browser/initialization.md | 2 +- msal/msal/browser/login-user.md | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/msal/msal/browser/acquire-token.md b/msal/msal/browser/acquire-token.md index b51b6ff..09100b1 100644 --- a/msal/msal/browser/acquire-token.md +++ b/msal/msal/browser/acquire-token.md @@ -13,4 +13,4 @@ ms.date: 04/12/2023 ms.author: dmwendia --- -[!INCLUDE[MSAL Browser token acquisition](~/msal-browser/docs/includes/acquire-token.md)] \ No newline at end of file +[!INCLUDE[MSAL Browser token acquisition](/../msal-browser/docs/includes/acquire-token.md)] diff --git a/msal/msal/browser/initialization.md b/msal/msal/browser/initialization.md index a5ca8a9..7d3d288 100644 --- a/msal/msal/browser/initialization.md +++ b/msal/msal/browser/initialization.md @@ -24,4 +24,4 @@ ms.author: dmwendia --> -[!INCLUDE[MSAL Browser initialization](~/lib/msal-browser/docs/includes/initialization.md)] +[!INCLUDE[MSAL Browser initialization](/lib/msal-browser/docs/includes/initialization.md)] diff --git a/msal/msal/browser/login-user.md b/msal/msal/browser/login-user.md index 2d2bad3..f8685b2 100644 --- a/msal/msal/browser/login-user.md +++ b/msal/msal/browser/login-user.md @@ -13,4 +13,4 @@ ms.date: 04/12/2023 ms.author: dmwendia --- -[!INCLUDE[Sign in users](~/microsoft-authentication-library-for-js/lib/msal-browser/docs/includes/login-user.md)] \ No newline at end of file +[!INCLUDE[Sign in users](msal-browser/docs/includes/login-user.md)] \ No newline at end of file From 5007556dd9032d35db5e00c1bf2dac4ae5a8147e Mon Sep 17 00:00:00 2001 From: Dickson Mwendia <64727760+Dickson-Mwendia@users.noreply.github.com> Date: Fri, 14 Apr 2023 10:11:52 +0300 Subject: [PATCH 17/47] update docfx.json --- msal-javascript-conceptual/docfx.json | 1 + msal/msal/browser/initialization.md | 3 +++ 2 files changed, 4 insertions(+) diff --git a/msal-javascript-conceptual/docfx.json b/msal-javascript-conceptual/docfx.json index 78cd05d..5ed2f36 100644 --- a/msal-javascript-conceptual/docfx.json +++ b/msal-javascript-conceptual/docfx.json @@ -18,6 +18,7 @@ "LICENSE-CODE", "ThirdPartyNotices.md", "SECURITY.md" + "lib/**" ] } ], diff --git a/msal/msal/browser/initialization.md b/msal/msal/browser/initialization.md index 7d3d288..962dfc8 100644 --- a/msal/msal/browser/initialization.md +++ b/msal/msal/browser/initialization.md @@ -24,4 +24,7 @@ ms.author: dmwendia --> +[!INCLUDE[MSAL Browser initialization](/lib/msal-browser/docs/includes/initialization.md)] + + [!INCLUDE[MSAL Browser initialization](/lib/msal-browser/docs/includes/initialization.md)] From aa9b93c0d3dfd35d2282cbe8bfa5d9ebba36dd0d Mon Sep 17 00:00:00 2001 From: Dickson Mwendia <64727760+Dickson-Mwendia@users.noreply.github.com> Date: Fri, 14 Apr 2023 10:28:39 +0300 Subject: [PATCH 18/47] try fixing includes --- msal-javascript-conceptual/index.md | 5 ++++- msal/msal/browser/initialization.md | 10 ---------- 2 files changed, 4 insertions(+), 11 deletions(-) diff --git a/msal-javascript-conceptual/index.md b/msal-javascript-conceptual/index.md index 42dc4db..da799ca 100644 --- a/msal-javascript-conceptual/index.md +++ b/msal-javascript-conceptual/index.md @@ -6,4 +6,7 @@ ms.date: 04/12/2023 ms.author: dmwendia --- -# Welcome to msal-javascript-conceptual! \ No newline at end of file +# Welcome to msal-javascript-conceptual! + + +J \ No newline at end of file diff --git a/msal/msal/browser/initialization.md b/msal/msal/browser/initialization.md index 962dfc8..b7ba480 100644 --- a/msal/msal/browser/initialization.md +++ b/msal/msal/browser/initialization.md @@ -17,14 +17,4 @@ ms.author: dmwendia # Getting started with MSAL Browser - - - -[!INCLUDE[MSAL Browser initialization](/lib/msal-browser/docs/includes/initialization.md)] - - [!INCLUDE[MSAL Browser initialization](/lib/msal-browser/docs/includes/initialization.md)] From 4bd4bb63b1f203ffa0188ebbe8b0ff9af891858f Mon Sep 17 00:00:00 2001 From: Dickson Mwendia <64727760+Dickson-Mwendia@users.noreply.github.com> Date: Fri, 14 Apr 2023 10:47:13 +0300 Subject: [PATCH 19/47] include path syntax --- msal/msal/browser/acquire-token.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/msal/msal/browser/acquire-token.md b/msal/msal/browser/acquire-token.md index 09100b1..113e9bc 100644 --- a/msal/msal/browser/acquire-token.md +++ b/msal/msal/browser/acquire-token.md @@ -13,4 +13,4 @@ ms.date: 04/12/2023 ms.author: dmwendia --- -[!INCLUDE[MSAL Browser token acquisition](/../msal-browser/docs/includes/acquire-token.md)] +[!INCLUDE[MSAL Browser token acquisition](~/../lib/msal-browser/docs/includes/acquire-token.md)] From 508467eb168d7865de74a26f9d38a4acfbfbc736 Mon Sep 17 00:00:00 2001 From: Dickson Mwendia <64727760+Dickson-Mwendia@users.noreply.github.com> Date: Fri, 14 Apr 2023 11:54:39 +0300 Subject: [PATCH 20/47] update crr repo --- .openpublishing.publish.config.json | 4 ++-- msal/msal/browser/initialization.md | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.openpublishing.publish.config.json b/.openpublishing.publish.config.json index 1ae10fd..5f7ee0f 100644 --- a/.openpublishing.publish.config.json +++ b/.openpublishing.publish.config.json @@ -68,8 +68,8 @@ }, { "path_to_root": "lib", - "url": "https://github.com/Dickson-Mwendia/microsoft-authentication-library-for-js", - "branch": "cross-repo-references-metadata", + "url": "https://github.com/AzureAD/microsoft-authentication-library-for-js", + "branch": "test-cross-repo-reference", "branch_mapping": {} } ], diff --git a/msal/msal/browser/initialization.md b/msal/msal/browser/initialization.md index b7ba480..423b49f 100644 --- a/msal/msal/browser/initialization.md +++ b/msal/msal/browser/initialization.md @@ -17,4 +17,4 @@ ms.author: dmwendia # Getting started with MSAL Browser -[!INCLUDE[MSAL Browser initialization](/lib/msal-browser/docs/includes/initialization.md)] +[!INCLUDE[MSAL Browser initialization](~/../../lib/msal-browser/docs/includes/initialization.md)] From 71eeff5ea6d33d431cbf1a61613f11f9a2a88e00 Mon Sep 17 00:00:00 2001 From: "den (work)" <53200638+localden@users.noreply.github.com> Date: Wed, 26 Jul 2023 15:43:41 -0700 Subject: [PATCH 21/47] Try to update the configuration --- .openpublishing.publish.config.json | 4 +- msal/msal/PackageStructure.png | Bin 37955 -> 0 bytes msal/msal/browser/acquire-token.md | 16 ---- msal/msal/browser/initialization.md | 20 ----- msal/msal/browser/login-user.md | 16 ---- msal/msal/browser/v1-migration.md | 127 ---------------------------- msal/msal/browser/v2-migration.md | 81 ------------------ msal/msal/msal-overview.md | 66 --------------- 8 files changed, 2 insertions(+), 328 deletions(-) delete mode 100644 msal/msal/PackageStructure.png delete mode 100644 msal/msal/browser/acquire-token.md delete mode 100644 msal/msal/browser/initialization.md delete mode 100644 msal/msal/browser/login-user.md delete mode 100644 msal/msal/browser/v1-migration.md delete mode 100644 msal/msal/browser/v2-migration.md delete mode 100644 msal/msal/msal-overview.md diff --git a/.openpublishing.publish.config.json b/.openpublishing.publish.config.json index 5f7ee0f..ac41a7b 100644 --- a/.openpublishing.publish.config.json +++ b/.openpublishing.publish.config.json @@ -67,9 +67,9 @@ "branch_mapping": {} }, { - "path_to_root": "lib", + "path_to_root": "msal-javascript-conceptual", "url": "https://github.com/AzureAD/microsoft-authentication-library-for-js", - "branch": "test-cross-repo-reference", + "branch": "dev", "branch_mapping": {} } ], diff --git a/msal/msal/PackageStructure.png b/msal/msal/PackageStructure.png deleted file mode 100644 index e4e4b32f51e6ae2efc614b4f07de5a8f7241d76a..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 37955 zcmeFZ2~?8l8#hejOy=ZLw&%iVPG*^=nY+?NPBx`hR#q-lW?C*NxPc-yI$BwpV@Zw* z*`m{!qE;d*VrgPx;EW3vDy1SS3W*{j+xMu=OtbvYd6)0~&U?P|=NykL&-2{(ecjjg zyO#UvAei8`+t^IobZ^`~6CLchc?4JF5zd0HoFs_h22@6J<#xtm$ z5RWz;!LohVO~1!KnyJ1MdBd{n*YMg8ced7UzFw%6TCto3`l6@IwkUB!GW~R*^ZG!o zmbFXj*ZkQ2#j9m2_Kak#*yFy(eOYvh31WI2iJyq02ABG6lQ7yOuWu8)n(Q8A<6`K} zxhOn5KpD3Um=_3iY2~%g7v7w{WxQnJ&H9J#3;#jingNRhUY8F44_xvjJtY{AIxoHf zPlWFM^R@Qo9U0TA*1dYFEa5nqEEw*>Dz1F;(np-_2P0Ju=htb#W(ROSDn6W3J_k_@ zh>ibzAsVitux$$7A(Kz_5T1j{Qu#SOU(g^ld=*X9y{4e$a(*( zDc)B>he@Z$SpBk>+lm27rhS(M0_|RhSM?t#u~WP+FeP%7X{`S8xu()ge}`Z{&39Pg zPcko^rF48%PkMM{>6n<6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2 zxRLpb#T7s0PWV_#A1{788pL3)|&_SvU@;Kfm;Z?2FXlM!!DW;%5 zGzHxTnPMv!g$f}EvS)6CASze{anf0Ey>;+;vA_a&70F|hYq3EmG>P7 ziT8FTO^ISJl`}Y2$3}I6HZFkEJLb6UV_`97qoSyCHQNUom0mr!m-meGA^~Hf=z%s% zl~6x%AV#`-Q5dGoErvL`jgnpfbl{K`VBS!Bvvc%5njax~Eow6n-bu^b7#qQg-IMs_C$rN{Ar3m7O>-6v%U5Lfz5=&th#zj^j1g!1A zPTU}qf+|0KnTcSB1i{|-#xe}H@1uYoaKIGI+F5{21-8Rc@#AUVJ?!+g+3g)-Oo9PY zxc8PM3!lJo{T}+t^P06^-}o(P<2_iY&LaQE9`N?>(!TaSn{_SA zv2*A3xRT#lqy|sJQ?)04=9rKE0k|XfuYkb{jCHq~05R-a1!?TREK*8d1m?xTIG}2K zthTjTXA3m&t2)3k&U|*M`S~TFU3x*g$K22UuOhkOWoIT6`G_ZZ-~M=6_fBq(`)Wwy z`+>yMb>6}8o8PIFK${~rt?-JWK0FlKKIna%|e;nTG!GFQL24) v_RZp%K| { - let accountObj = null; - if (tokenResponse !== null) { - accountObj = tokenResponse.account; - const id_token = tokenResponse.idToken; - const access_token = tokenResponse.accessToken; - } else { - const currentAccounts = myMSALObj.getAllAccounts(); - if (!currentAccounts || currentAccounts.length === 0) { - // No user signed in - return; - } else if (currentAccounts.length > 1) { - // More than one user signed in, find desired user with getAccountByUsername(username) - } else { - accountObj = currentAccounts[0]; - } - } - - const username = accountObj.username; - -}).catch((error) => { - handleError(error); -}); - -function signIn() { - myMSALObj.loginRedirect(loginRequest); -} - -async function getTokenRedirect(request) { - return await myMSALObj.acquireTokenSilent(request).catch(error => { - this.logger.info("silent token acquisition fails. acquiring token using redirect"); - // fallback to interaction when silent call fails - return myMSALObj.acquireTokenRedirect(request) - }); -} -``` - -During `loginPopup`, `acquireTokenPopup`, or `acquireTokenSilent` calls, you can wait for the promise to resolve. - -```javascript -const myMSALObj = new msal.PublicClientApplication(msalConfig); - -async function signIn(method) { - try { - const loginResponse = await myMSALObj.loginPopup(loginRequest); - } catch (err) { - handleError(error); - } - - const currentAccounts = myMSALObj.getAllAccounts(); - if (!currentAccounts || currentAccounts.length === 0) { - // No user signed in - return; - } else if (currentAccounts.length > 1) { - // More than one user signed in, find desired user with getAccountByUsername(username) - } else { - accountObj = currentAccounts[0]; - } -} - -async function getTokenPopup(request) { - return await myMSALObj.acquireTokenSilent(request).catch(async (error) => { - this.logger.info("silent token acquisition fails. acquiring token using popup"); - // fallback to interaction when silent call fails - return await myMSALObj.acquireTokenPopup(request).catch(error => { - handleError(error); - }); - }); -} -``` - -Please see the [login](./login-user.md) and [acquire token](./acquire-token.md) docs for more detailed information on usage. - -Refresh tokens are now returned as part of the token responses, and are used by the library to renew access tokens without interaction or the use of iframes. See the [token lifetimes docs](./token-lifetimes.md) for more information on renewing tokens. - -All other APIs should work as before. It is recommended to take a look at the [default sample](../../../samples/msal-browser-samples/VanillaJSTestApp2.0) to see a working example of MSAL 2.0. diff --git a/msal/msal/browser/v2-migration.md b/msal/msal/browser/v2-migration.md deleted file mode 100644 index 98aa16d..0000000 --- a/msal/msal/browser/v2-migration.md +++ /dev/null @@ -1,81 +0,0 @@ -# Migrating from MSAL 2.x to MSAL 3.x - -If you are new to MSAL, you should start [here](initialization.md). - -If you are coming from [MSAL v1.x](../../msal-core/), you should check [this guide](v1-migration.md) first to migrate to [MSAL v2.x](../../msal-browser/) and then follow next steps. - -If you are coming from [MSAL v2.x](../../msal-browser/), you can follow this guide to update your code to use [MSAL v3.x](../../msal-browser/). - -## Update your code - -In MSAL v2.x, you created an application instance as below: - -```javascript -import * as msal from "@azure/msal-browser"; - -const msalConfig = { - auth: { - clientId: 'your_client_id' - } -}; - -const msalInstance = new msal.PublicClientApplication(msalConfig); -``` - -In MSAL v3.x, you must initialize the application object as well. There are several options at your disposal: - -### Option 1 - -Instantiate a `PublicClientApplication` object and initialize it afterwards. The `initialize` function is asynchronous and must resolve before invoking other MSAL.js APIs. - -```javascript -import * as msal from "@azure/msal-browser"; - -const msalConfig = { - auth: { - clientId: 'your_client_id' - } -}; - -const msalInstance = new msal.PublicClientApplication(msalConfig); -await msalInstance.initialize(); -``` - -### Option 2 - -Invoke the `createPublicClientApplication` static method which returns an initialized `PublicClientApplication` object. Note that this function is asynchronous. - -```javascript -import * as msal from "@azure/msal-browser"; - -const msalConfig = { - auth: { - clientId: 'your_client_id' - } -}; - -const msalInstance = await msal.PublicClientApplication.createPublicClientApplication(msalConfig); -``` - -All other APIs are backward compatible with [MSAL v2.x](../../msal-browser/). It is recommended to take a look at the [default sample](../../../samples/msal-browser-samples/VanillaJSTestApp2.0) to see a working example of MSAL v3.0. - -## Key changes - -### Browser support - -MSAL.js no longer supports the following browsers: - -- IE 11 -- Edge (Legacy) - -### Package dependencies - -Typescript version was bumped from `3.8.3` to `4.9.5`. - -### Compiler options - -Module/target versions were bumped from `es6`/`es5` to `es2020`/`es2020` respectively. - -### CDN - -MSAL.js is no longer hosted on a CDN. Check [this doc](cdn-usage.md) for more details. diff --git a/msal/msal/msal-overview.md b/msal/msal/msal-overview.md deleted file mode 100644 index 94b6374..0000000 --- a/msal/msal/msal-overview.md +++ /dev/null @@ -1,66 +0,0 @@ ---- -title: Overview -description: Overview of the Microsoft Authentication Libraries for JavaScript -services: active-directory -author: Dickson-Mwendia -manager: CelesteDG - -ms.service: active-directory -ms.subservice: develop -ms.topic: reference -ms.workload: identity -ms.date: 01/10/2023 -ms.author: dmwendia ---- -# Microsoft Authentication Library for JavaScript (MSAL.js) - -The Microsoft Authentication Library for JavaScript enables both client-side and server-side JavaScript applications to authenticate users using [Azure Active Directory](/../../azure/active-directory/develop/v2-overview) (Azure AD) for work and school accounts, Microsoft personal accounts (MSA), and social identity providers like Facebook, Google, LinkedIn, Microsoft accounts, etc. through [Azure AD B2C](/../../azure/active-directory-b2c/active-directory-b2c-overview#identity-providers) service. It also enables your app to get tokens to access [Microsoft Cloud](https://www.microsoft.com/enterprise) services such as [Microsoft Graph](https://graph.microsoft.io). - - -## Core and wrapper libraries - -The [`lib`](https://github.com/AzureAD/microsoft-authentication-library-for-js/tree/dev/lib) folder contains the source code for our libraries in active development. You will also find all the details about **installing the libraries** in their respective README.md files. - -- **Microsoft Authentication Library for Node.js v1.x:** A [Node.js](https://nodejs.org/en/) library that enables authentication and token acquisition with the Microsoft Identity platform in JavaScript applications. Implements the following OAuth 2.0 protocols and is [OpenID-compliant](/../../azure/active-directory/develop/v2-protocols-oidc): - - [Authorization Code Grant](https://oauth.net/2/grant-types/authorization-code/) with [PKCE](https://oauth.net/2/pkce/) - - [Device Code Grant](https://oauth.net/2/grant-types/device-code/) - - [Refresh Token Grant](https://oauth.net/2/grant-types/refresh-token/) - - [Client Credential Grant](https://oauth.net/2/grant-types/client-credentials/) - -- **Microsoft Authentication Library for JavaScript v2.x**: A browser-based, framework-agnostic browser library that enables authentication and token acquisition with the Microsoft Identity platform in JavaScript applications. Implements the OAuth 2.0 [Authorization Code Flow with PKCE](/../../azure/active-directory/develop/v2-oauth2-auth-code-flow), and is [OpenID-compliant](/../../azure/active-directory/develop/v2-protocols-oidc). - -- **Microsoft Authentication Library for React v1.x**: A wrapper of the msal-browser 2.x library for apps using React. - -- **Microsoft Authentication Library for Angular v2.x**: A wrapper of the msal-browser 2.x library for apps using Angular framework. - -- **Microsoft Authentication Library for JavaScript v1.x**: A browser-based, framework-agnostic core library that enables authentication and token acquisition with the Microsoft Identity platform in JavaScript applications. Implements the OAuth 2.0 [Implicit Grant Flow](/../../azure/active-directory/develop/v2-oauth2-implicit-grant-flow), and is [OpenID-compliant](/../../azure/active-directory/develop/v2-protocols-oidc). - -- [Microsoft Authentication Library for Angular](https://github.com/AzureAD/microsoft-authentication-library-for-js/tree/msal-angular-v1/lib/msal-angular): A wrapper of the core 1.x library for apps using Angular framework. - -## Package structure - -There are a number of different packages meant for different platforms. You can see the relationship between packages and different authentication flows they implement in the package structure below. - -![Package Structure](PackageStructure.png) - -## Samples - -The [`code samples`](https://github.com/AzureAD/microsoft-authentication-library-for-js/tree/dev/samples) demonstrate usage of the Microsoft authentication libraries for JavaScript with the identity platform. Each code sample includes a `README.md` file describing how to build the project (if applicable) and run the sample application. - -For a complete list of samples targeting JavaScript and other languages, frameworks, and platforms, please refer to the [Microsoft identity platform code samples](/../../azure/active-directory/develop/sample-v2-code). - - -## Package versioning - -All of our libraries follow [semantic versioning](https://semver.org). We recommend using the latest version of each library to ensure you have the latest security patches and bug fixes. - -## Community help and support - -- [FAQs](https://github.com/AzureAD/microsoft-authentication-library-for-js/wiki/FAQs) for access to our frequently asked questions. - -- [Stack Overflow](http://stackoverflow.com/questions/tagged/msal) using "msal" and "msal.js" tag. - - -## Security reporting - -If you find a security issue with our libraries or services [please report it to the Microsoft Security Response Center (MSRC)](https://aka.ms/report-security-issue) with as much detail as possible. Your submission may be eligible for a bounty through the [Microsoft Bounty](https://aka.ms/bugbounty) program. Please do not post security issues to GitHub Issues or any other public site. We will contact you shortly upon receiving the information. If you'd like to get notifications of when security incidents occur, [subscribe to security advisory alerts](https://msrc-blog.microsoft.com/2022/08/09/security-update-guide-notification-system-news-create-your-profile-now/). \ No newline at end of file From 05bf40b1919e1a6c16dfdb8fd3a518e25265aa79 Mon Sep 17 00:00:00 2001 From: "den (work)" <53200638+localden@users.noreply.github.com> Date: Wed, 26 Jul 2023 15:48:08 -0700 Subject: [PATCH 22/47] Update docfx.json --- msal-javascript-conceptual/docfx.json | 1 - 1 file changed, 1 deletion(-) diff --git a/msal-javascript-conceptual/docfx.json b/msal-javascript-conceptual/docfx.json index dd7f6c8..5b4e445 100644 --- a/msal-javascript-conceptual/docfx.json +++ b/msal-javascript-conceptual/docfx.json @@ -18,7 +18,6 @@ "LICENSE-CODE", "ThirdPartyNotices.md", "SECURITY.md" - "lib/**" ] } ], From 44ee08ddcdb9f8536b1ffd7e0d6067268ddcc906 Mon Sep 17 00:00:00 2001 From: "den (work)" <53200638+localden@users.noreply.github.com> Date: Wed, 26 Jul 2023 16:11:32 -0700 Subject: [PATCH 23/47] Update with a customized task --- .openpublishing.publish.config.json | 5 +++++ scripts/ContentMove.ps1 | 1 + 2 files changed, 6 insertions(+) create mode 100644 scripts/ContentMove.ps1 diff --git a/.openpublishing.publish.config.json b/.openpublishing.publish.config.json index ac41a7b..8c8eaee 100644 --- a/.openpublishing.publish.config.json +++ b/.openpublishing.publish.config.json @@ -27,6 +27,11 @@ "build_source_folder": "msal-javascript-conceptual", "build_output_subfolder": "msal-javascript-conceptual", "locale": "en-us", + "customized_tasks": { + "docset_postbuild": [ + "scipts/ContentMove.ps1" + ] + }, "monikers": [], "moniker_ranges": [], "open_to_public_contributors": true, diff --git a/scripts/ContentMove.ps1 b/scripts/ContentMove.ps1 new file mode 100644 index 0000000..8d31da8 --- /dev/null +++ b/scripts/ContentMove.ps1 @@ -0,0 +1 @@ +Move-Item -Path msal-javascript-conceptual\lib\msal-angular\docs -Destination msal-javascript-conceptual\msal-angular \ No newline at end of file From d5d1372f3acfec817b3e77a7278d519a8edde6fc Mon Sep 17 00:00:00 2001 From: "den (work)" <53200638+localden@users.noreply.github.com> Date: Wed, 26 Jul 2023 16:12:36 -0700 Subject: [PATCH 24/47] Making sure we list folder contents --- scripts/ContentMove.ps1 | 1 + 1 file changed, 1 insertion(+) diff --git a/scripts/ContentMove.ps1 b/scripts/ContentMove.ps1 index 8d31da8..22f1e9d 100644 --- a/scripts/ContentMove.ps1 +++ b/scripts/ContentMove.ps1 @@ -1 +1,2 @@ +Get-ChildItem Move-Item -Path msal-javascript-conceptual\lib\msal-angular\docs -Destination msal-javascript-conceptual\msal-angular \ No newline at end of file From 039218c2eaa7bcb85e7b9edf1f39524ebe5427b4 Mon Sep 17 00:00:00 2001 From: "den (work)" <53200638+localden@users.noreply.github.com> Date: Wed, 26 Jul 2023 16:14:05 -0700 Subject: [PATCH 25/47] Update .openpublishing.publish.config.json --- .openpublishing.publish.config.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.openpublishing.publish.config.json b/.openpublishing.publish.config.json index 8c8eaee..e2fd5ed 100644 --- a/.openpublishing.publish.config.json +++ b/.openpublishing.publish.config.json @@ -29,7 +29,7 @@ "locale": "en-us", "customized_tasks": { "docset_postbuild": [ - "scipts/ContentMove.ps1" + "scripts/ContentMove.ps1" ] }, "monikers": [], From 422d86fe2d5e23e5184bb6ff1e25a2cd7416f685 Mon Sep 17 00:00:00 2001 From: "den (work)" <53200638+localden@users.noreply.github.com> Date: Wed, 26 Jul 2023 16:19:34 -0700 Subject: [PATCH 26/47] Update .openpublishing.publish.config.json --- .openpublishing.publish.config.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.openpublishing.publish.config.json b/.openpublishing.publish.config.json index e2fd5ed..7124b30 100644 --- a/.openpublishing.publish.config.json +++ b/.openpublishing.publish.config.json @@ -74,7 +74,7 @@ { "path_to_root": "msal-javascript-conceptual", "url": "https://github.com/AzureAD/microsoft-authentication-library-for-js", - "branch": "dev", + "branch": "main", "branch_mapping": {} } ], From 4a7fc24571dfec9e9917ada983fd4cc1c397e7b7 Mon Sep 17 00:00:00 2001 From: "den (work)" <53200638+localden@users.noreply.github.com> Date: Wed, 26 Jul 2023 16:41:26 -0700 Subject: [PATCH 27/47] Update .openpublishing.publish.config.json --- .openpublishing.publish.config.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.openpublishing.publish.config.json b/.openpublishing.publish.config.json index 7124b30..50ff723 100644 --- a/.openpublishing.publish.config.json +++ b/.openpublishing.publish.config.json @@ -72,9 +72,9 @@ "branch_mapping": {} }, { - "path_to_root": "msal-javascript-conceptual", + "path_to_root": "msal-javascript-conceptual/_libdr", "url": "https://github.com/AzureAD/microsoft-authentication-library-for-js", - "branch": "main", + "branch": "dev", "branch_mapping": {} } ], From b467e07ef3bbe27eab7012eee236ec82c9a6b2aa Mon Sep 17 00:00:00 2001 From: "den (work)" <53200638+localden@users.noreply.github.com> Date: Wed, 26 Jul 2023 16:45:29 -0700 Subject: [PATCH 28/47] Create test.md --- msal-javascript-conceptual/test/test.md | 0 1 file changed, 0 insertions(+), 0 deletions(-) create mode 100644 msal-javascript-conceptual/test/test.md diff --git a/msal-javascript-conceptual/test/test.md b/msal-javascript-conceptual/test/test.md new file mode 100644 index 0000000..e69de29 From 05fc997a25cd47e2c642099603fb9d302fe32b0f Mon Sep 17 00:00:00 2001 From: "den (work)" <53200638+localden@users.noreply.github.com> Date: Wed, 26 Jul 2023 16:59:11 -0700 Subject: [PATCH 29/47] Update .openpublishing.publish.config.json --- .openpublishing.publish.config.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.openpublishing.publish.config.json b/.openpublishing.publish.config.json index 50ff723..88e6b20 100644 --- a/.openpublishing.publish.config.json +++ b/.openpublishing.publish.config.json @@ -72,7 +72,7 @@ "branch_mapping": {} }, { - "path_to_root": "msal-javascript-conceptual/_libdr", + "path_to_root": "_libdr", "url": "https://github.com/AzureAD/microsoft-authentication-library-for-js", "branch": "dev", "branch_mapping": {} From 443bcd74aed6888fbfba3565407900a9e1e13527 Mon Sep 17 00:00:00 2001 From: "den (work)" <53200638+localden@users.noreply.github.com> Date: Wed, 26 Jul 2023 17:02:23 -0700 Subject: [PATCH 30/47] Update test.md --- msal-javascript-conceptual/test/test.md | 1 + 1 file changed, 1 insertion(+) diff --git a/msal-javascript-conceptual/test/test.md b/msal-javascript-conceptual/test/test.md index e69de29..ebfe281 100644 --- a/msal-javascript-conceptual/test/test.md +++ b/msal-javascript-conceptual/test/test.md @@ -0,0 +1 @@ +[!INCLUDE[Include a hello token here](_libdr/lib/msal-angular/docs/events.md)] \ No newline at end of file From b07cc3ce3c5986b492158c10a68ae28253044adb Mon Sep 17 00:00:00 2001 From: "den (work)" <53200638+localden@users.noreply.github.com> Date: Wed, 26 Jul 2023 17:04:54 -0700 Subject: [PATCH 31/47] Update content --- .openpublishing.publish.config.json | 2 +- msal-javascript-conceptual/test/test.md | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.openpublishing.publish.config.json b/.openpublishing.publish.config.json index 88e6b20..50ff723 100644 --- a/.openpublishing.publish.config.json +++ b/.openpublishing.publish.config.json @@ -72,7 +72,7 @@ "branch_mapping": {} }, { - "path_to_root": "_libdr", + "path_to_root": "msal-javascript-conceptual/_libdr", "url": "https://github.com/AzureAD/microsoft-authentication-library-for-js", "branch": "dev", "branch_mapping": {} diff --git a/msal-javascript-conceptual/test/test.md b/msal-javascript-conceptual/test/test.md index ebfe281..f3944f3 100644 --- a/msal-javascript-conceptual/test/test.md +++ b/msal-javascript-conceptual/test/test.md @@ -1 +1 @@ -[!INCLUDE[Include a hello token here](_libdr/lib/msal-angular/docs/events.md)] \ No newline at end of file +[!INCLUDE[Include a hello token here](~/_libdr/lib/msal-angular/docs/events.md)] \ No newline at end of file From fb52c90cdb7d89610f6a59a8902325e9e65f9cd5 Mon Sep 17 00:00:00 2001 From: "den (work)" <53200638+localden@users.noreply.github.com> Date: Wed, 26 Jul 2023 17:07:34 -0700 Subject: [PATCH 32/47] Update .openpublishing.publish.config.json --- .openpublishing.publish.config.json | 1 + 1 file changed, 1 insertion(+) diff --git a/.openpublishing.publish.config.json b/.openpublishing.publish.config.json index 50ff723..ae31af1 100644 --- a/.openpublishing.publish.config.json +++ b/.openpublishing.publish.config.json @@ -75,6 +75,7 @@ "path_to_root": "msal-javascript-conceptual/_libdr", "url": "https://github.com/AzureAD/microsoft-authentication-library-for-js", "branch": "dev", + "include_in_build": true, "branch_mapping": {} } ], From e7e39988e6ef50e8463540e1ff262a160639a9f0 Mon Sep 17 00:00:00 2001 From: "den (work)" <53200638+localden@users.noreply.github.com> Date: Wed, 26 Jul 2023 17:11:03 -0700 Subject: [PATCH 33/47] Cleanup --- msal-javascript-conceptual/docfx.json | 4 +++- msal-javascript-conceptual/test/test.md | 1 - 2 files changed, 3 insertions(+), 2 deletions(-) delete mode 100644 msal-javascript-conceptual/test/test.md diff --git a/msal-javascript-conceptual/docfx.json b/msal-javascript-conceptual/docfx.json index 5b4e445..bdfbf1a 100644 --- a/msal-javascript-conceptual/docfx.json +++ b/msal-javascript-conceptual/docfx.json @@ -17,7 +17,9 @@ "LICENSE", "LICENSE-CODE", "ThirdPartyNotices.md", - "SECURITY.md" + "SECURITY.md", + "_libdr/**/*.yml", + "_libdr/*.md" ] } ], diff --git a/msal-javascript-conceptual/test/test.md b/msal-javascript-conceptual/test/test.md deleted file mode 100644 index f3944f3..0000000 --- a/msal-javascript-conceptual/test/test.md +++ /dev/null @@ -1 +0,0 @@ -[!INCLUDE[Include a hello token here](~/_libdr/lib/msal-angular/docs/events.md)] \ No newline at end of file From 937af2291106c65eacb5504ac9c1b450ad63e9df Mon Sep 17 00:00:00 2001 From: "den (work)" <53200638+localden@users.noreply.github.com> Date: Wed, 26 Jul 2023 17:17:33 -0700 Subject: [PATCH 34/47] Update .openpublishing.publish.config.json --- .openpublishing.publish.config.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.openpublishing.publish.config.json b/.openpublishing.publish.config.json index ae31af1..87e70bf 100644 --- a/.openpublishing.publish.config.json +++ b/.openpublishing.publish.config.json @@ -28,7 +28,7 @@ "build_output_subfolder": "msal-javascript-conceptual", "locale": "en-us", "customized_tasks": { - "docset_postbuild": [ + "docset_prebuild": [ "scripts/ContentMove.ps1" ] }, From b68076f58baed2daae6bda36a844cf6686e67e31 Mon Sep 17 00:00:00 2001 From: "den (work)" <53200638+localden@users.noreply.github.com> Date: Wed, 26 Jul 2023 17:20:37 -0700 Subject: [PATCH 35/47] Update docfx.json --- msal-javascript-conceptual/docfx.json | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/msal-javascript-conceptual/docfx.json b/msal-javascript-conceptual/docfx.json index bdfbf1a..101b9c9 100644 --- a/msal-javascript-conceptual/docfx.json +++ b/msal-javascript-conceptual/docfx.json @@ -18,8 +18,7 @@ "LICENSE-CODE", "ThirdPartyNotices.md", "SECURITY.md", - "_libdr/**/*.yml", - "_libdr/*.md" + "_libdr/**/*.yml" ] } ], From ecb3801382606a7aaa60d5da491e742d0e21872c Mon Sep 17 00:00:00 2001 From: "den (work)" <53200638+localden@users.noreply.github.com> Date: Wed, 26 Jul 2023 17:22:35 -0700 Subject: [PATCH 36/47] Update docfx.json --- msal-javascript-conceptual/docfx.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/msal-javascript-conceptual/docfx.json b/msal-javascript-conceptual/docfx.json index 101b9c9..8af4689 100644 --- a/msal-javascript-conceptual/docfx.json +++ b/msal-javascript-conceptual/docfx.json @@ -18,7 +18,7 @@ "LICENSE-CODE", "ThirdPartyNotices.md", "SECURITY.md", - "_libdr/**/*.yml" + "_libdr/*.yml" ] } ], From 435a33f444d5a6dbe76f216ed55f9a9c4a980d26 Mon Sep 17 00:00:00 2001 From: "den (work)" <53200638+localden@users.noreply.github.com> Date: Wed, 26 Jul 2023 17:24:35 -0700 Subject: [PATCH 37/47] Update docfx.json --- msal-javascript-conceptual/docfx.json | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/msal-javascript-conceptual/docfx.json b/msal-javascript-conceptual/docfx.json index 8af4689..71bbc82 100644 --- a/msal-javascript-conceptual/docfx.json +++ b/msal-javascript-conceptual/docfx.json @@ -18,7 +18,8 @@ "LICENSE-CODE", "ThirdPartyNotices.md", "SECURITY.md", - "_libdr/*.yml" + "_libdr/*.yml", + "_libdr/build/*.yml" ] } ], From 7a84f7c311418bc016c8aa984dae4027e5fb21c8 Mon Sep 17 00:00:00 2001 From: "den (work)" <53200638+localden@users.noreply.github.com> Date: Wed, 26 Jul 2023 17:27:53 -0700 Subject: [PATCH 38/47] Update testing code --- .openpublishing.publish.config.json | 2 +- msal-javascript-conceptual/docfx.json | 4 ++-- scripts/ContentMove.ps1 | 1 + 3 files changed, 4 insertions(+), 3 deletions(-) diff --git a/.openpublishing.publish.config.json b/.openpublishing.publish.config.json index 87e70bf..86d55d5 100644 --- a/.openpublishing.publish.config.json +++ b/.openpublishing.publish.config.json @@ -72,7 +72,7 @@ "branch_mapping": {} }, { - "path_to_root": "msal-javascript-conceptual/_libdr", + "path_to_root": "msal-javascript-conceptual/lcontent", "url": "https://github.com/AzureAD/microsoft-authentication-library-for-js", "branch": "dev", "include_in_build": true, diff --git a/msal-javascript-conceptual/docfx.json b/msal-javascript-conceptual/docfx.json index 71bbc82..415ed01 100644 --- a/msal-javascript-conceptual/docfx.json +++ b/msal-javascript-conceptual/docfx.json @@ -18,8 +18,8 @@ "LICENSE-CODE", "ThirdPartyNotices.md", "SECURITY.md", - "_libdr/*.yml", - "_libdr/build/*.yml" + "lcontent/*.yml", + "lcontent/build/*.yml" ] } ], diff --git a/scripts/ContentMove.ps1 b/scripts/ContentMove.ps1 index 22f1e9d..cb77d96 100644 --- a/scripts/ContentMove.ps1 +++ b/scripts/ContentMove.ps1 @@ -1,2 +1,3 @@ Get-ChildItem +echo BuildAtriox Move-Item -Path msal-javascript-conceptual\lib\msal-angular\docs -Destination msal-javascript-conceptual\msal-angular \ No newline at end of file From ccb26d5346a1d985717f03058b913aa55176474c Mon Sep 17 00:00:00 2001 From: Den <53200638+localden@users.noreply.github.com> Date: Mon, 21 Aug 2023 16:24:21 -0700 Subject: [PATCH 39/47] Try customizing paths --- msal-javascript-conceptual/docfx.json | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/msal-javascript-conceptual/docfx.json b/msal-javascript-conceptual/docfx.json index 415ed01..5fd3210 100644 --- a/msal-javascript-conceptual/docfx.json +++ b/msal-javascript-conceptual/docfx.json @@ -1,6 +1,15 @@ { "build": { "content": [ + { + "src": "lcontent", + "dest": "test_js", + "files": [ + "**/*.md", + "**/*.yml" + ], + "exclude": [] + }, { "files": [ "**/*.md", From 2c53ff089f903aa64c53db1220678eadb719360a Mon Sep 17 00:00:00 2001 From: Den <53200638+localden@users.noreply.github.com> Date: Mon, 21 Aug 2023 16:27:30 -0700 Subject: [PATCH 40/47] No need for YML --- msal-javascript-conceptual/docfx.json | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/msal-javascript-conceptual/docfx.json b/msal-javascript-conceptual/docfx.json index 5fd3210..093e472 100644 --- a/msal-javascript-conceptual/docfx.json +++ b/msal-javascript-conceptual/docfx.json @@ -5,8 +5,7 @@ "src": "lcontent", "dest": "test_js", "files": [ - "**/*.md", - "**/*.yml" + "**/*.md" ], "exclude": [] }, From df6bbcadb3a3059cb142612227ea38d834e9380c Mon Sep 17 00:00:00 2001 From: Den <53200638+localden@users.noreply.github.com> Date: Mon, 21 Aug 2023 16:34:10 -0700 Subject: [PATCH 41/47] One more tweak --- msal-javascript-conceptual/docfx.json | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/msal-javascript-conceptual/docfx.json b/msal-javascript-conceptual/docfx.json index 093e472..fe60939 100644 --- a/msal-javascript-conceptual/docfx.json +++ b/msal-javascript-conceptual/docfx.json @@ -3,11 +3,16 @@ "content": [ { "src": "lcontent", - "dest": "test_js", + "dest": "guides", "files": [ "**/*.md" ], - "exclude": [] + "exclude": [ + "README.md", + "CHANGELOG.md", + "LICENSE.md", + "SECURITY.md", + ] }, { "files": [ From da28e7f7f293d68bc56f5fc9c68378ae6ec6fffb Mon Sep 17 00:00:00 2001 From: Den <53200638+localden@users.noreply.github.com> Date: Mon, 21 Aug 2023 16:38:40 -0700 Subject: [PATCH 42/47] Proper library path binding --- msal-javascript-conceptual/docfx.json | 58 +++++++++++++++++++++++++-- 1 file changed, 55 insertions(+), 3 deletions(-) diff --git a/msal-javascript-conceptual/docfx.json b/msal-javascript-conceptual/docfx.json index fe60939..bfa7c8d 100644 --- a/msal-javascript-conceptual/docfx.json +++ b/msal-javascript-conceptual/docfx.json @@ -2,8 +2,8 @@ "build": { "content": [ { - "src": "lcontent", - "dest": "guides", + "src": "lcontent/lib/msal-angular/docs", + "dest": "msal-angular", "files": [ "**/*.md" ], @@ -11,7 +11,59 @@ "README.md", "CHANGELOG.md", "LICENSE.md", - "SECURITY.md", + "SECURITY.md" + ] + }, + { + "src": "lcontent/lib/msal-browser/docs", + "dest": "msal-browser", + "files": [ + "**/*.md" + ], + "exclude": [ + "README.md", + "CHANGELOG.md", + "LICENSE.md", + "SECURITY.md" + ] + }, + { + "src": "lcontent/lib/msal-common/docs", + "dest": "msal-common", + "files": [ + "**/*.md" + ], + "exclude": [ + "README.md", + "CHANGELOG.md", + "LICENSE.md", + "SECURITY.md" + ] + }, + { + "src": "lcontent/lib/msal-node/docs", + "dest": "msal-node", + "files": [ + "**/*.md" + ], + "exclude": [ + "README.md", + "CHANGELOG.md", + "LICENSE.md", + "SECURITY.md" + ] + }, + { + "src": "lcontent/lib/msal-react/docs", + "dest": "msal-react", + "files": [ + "**/*.md" + ], + "exclude": [ + "README.md", + "CHANGELOG.md", + "LICENSE.md", + "SECURITY.md" ] }, { From d7525563f2c2e3932a9d4b46215ec44b7b08ffc0 Mon Sep 17 00:00:00 2001 From: Den <53200638+localden@users.noreply.github.com> Date: Mon, 21 Aug 2023 16:40:37 -0700 Subject: [PATCH 43/47] Script no longer used --- .openpublishing.publish.config.json | 5 ----- scripts/ContentMove.ps1 | 3 --- 2 files changed, 8 deletions(-) delete mode 100644 scripts/ContentMove.ps1 diff --git a/.openpublishing.publish.config.json b/.openpublishing.publish.config.json index 86d55d5..5c37318 100644 --- a/.openpublishing.publish.config.json +++ b/.openpublishing.publish.config.json @@ -27,11 +27,6 @@ "build_source_folder": "msal-javascript-conceptual", "build_output_subfolder": "msal-javascript-conceptual", "locale": "en-us", - "customized_tasks": { - "docset_prebuild": [ - "scripts/ContentMove.ps1" - ] - }, "monikers": [], "moniker_ranges": [], "open_to_public_contributors": true, diff --git a/scripts/ContentMove.ps1 b/scripts/ContentMove.ps1 deleted file mode 100644 index cb77d96..0000000 --- a/scripts/ContentMove.ps1 +++ /dev/null @@ -1,3 +0,0 @@ -Get-ChildItem -echo BuildAtriox -Move-Item -Path msal-javascript-conceptual\lib\msal-angular\docs -Destination msal-javascript-conceptual\msal-angular \ No newline at end of file From 11eba19cc81edf5b94f1cc914a5a4434aa5cc327 Mon Sep 17 00:00:00 2001 From: Den <53200638+localden@users.noreply.github.com> Date: Mon, 21 Aug 2023 16:44:28 -0700 Subject: [PATCH 44/47] More cleanup --- msal-javascript-conceptual/docfx.json | 29 ++++++++++++++++++++++----- 1 file changed, 24 insertions(+), 5 deletions(-) diff --git a/msal-javascript-conceptual/docfx.json b/msal-javascript-conceptual/docfx.json index bfa7c8d..6b85b6d 100644 --- a/msal-javascript-conceptual/docfx.json +++ b/msal-javascript-conceptual/docfx.json @@ -11,7 +11,8 @@ "README.md", "CHANGELOG.md", "LICENSE.md", - "SECURITY.md" + "SECURITY.md", + "CONTRIBUTING.md" ] }, { @@ -24,7 +25,8 @@ "README.md", "CHANGELOG.md", "LICENSE.md", - "SECURITY.md" + "SECURITY.md", + "CONTRIBUTING.md" ] }, { @@ -37,7 +39,8 @@ "README.md", "CHANGELOG.md", "LICENSE.md", - "SECURITY.md" + "SECURITY.md", + "CONTRIBUTING.md" ] }, { @@ -50,7 +53,8 @@ "README.md", "CHANGELOG.md", "LICENSE.md", - "SECURITY.md" + "SECURITY.md", + "CONTRIBUTING.md" ] }, { @@ -63,7 +67,22 @@ "README.md", "CHANGELOG.md", "LICENSE.md", - "SECURITY.md" + "SECURITY.md", + "CONTRIBUTING.md" + ] + }, + { + "src": "lcontent/extensions/docs", + "dest": "extensions", + "files": [ + "**/*.md" + ], + "exclude": [ + "README.md", + "CHANGELOG.md", + "LICENSE.md", + "SECURITY.md", + "CONTRIBUTING.md" ] }, { From 6c7344e61a2700b0a69aa7535f3202fb9ed518b3 Mon Sep 17 00:00:00 2001 From: Den <53200638+localden@users.noreply.github.com> Date: Mon, 21 Aug 2023 16:49:21 -0700 Subject: [PATCH 45/47] Reshuffle and consolidate --- msal-javascript-conceptual/docfx.json | 45 ++------------------------- 1 file changed, 3 insertions(+), 42 deletions(-) diff --git a/msal-javascript-conceptual/docfx.json b/msal-javascript-conceptual/docfx.json index 6b85b6d..0812501 100644 --- a/msal-javascript-conceptual/docfx.json +++ b/msal-javascript-conceptual/docfx.json @@ -6,13 +6,6 @@ "dest": "msal-angular", "files": [ "**/*.md" - ], - "exclude": [ - "README.md", - "CHANGELOG.md", - "LICENSE.md", - "SECURITY.md", - "CONTRIBUTING.md" ] }, { @@ -20,13 +13,6 @@ "dest": "msal-browser", "files": [ "**/*.md" - ], - "exclude": [ - "README.md", - "CHANGELOG.md", - "LICENSE.md", - "SECURITY.md", - "CONTRIBUTING.md" ] }, { @@ -34,13 +20,6 @@ "dest": "msal-common", "files": [ "**/*.md" - ], - "exclude": [ - "README.md", - "CHANGELOG.md", - "LICENSE.md", - "SECURITY.md", - "CONTRIBUTING.md" ] }, { @@ -48,13 +27,6 @@ "dest": "msal-node", "files": [ "**/*.md" - ], - "exclude": [ - "README.md", - "CHANGELOG.md", - "LICENSE.md", - "SECURITY.md", - "CONTRIBUTING.md" ] }, { @@ -62,13 +34,6 @@ "dest": "msal-react", "files": [ "**/*.md" - ], - "exclude": [ - "README.md", - "CHANGELOG.md", - "LICENSE.md", - "SECURITY.md", - "CONTRIBUTING.md" ] }, { @@ -76,13 +41,6 @@ "dest": "extensions", "files": [ "**/*.md" - ], - "exclude": [ - "README.md", - "CHANGELOG.md", - "LICENSE.md", - "SECURITY.md", - "CONTRIBUTING.md" ] }, { @@ -91,6 +49,8 @@ "**/*.yml" ], "exclude": [ + "CHANGELOG.md", + "LICENSE.md", "**/obj/**", "**/includes/**", "_themes/**", @@ -102,6 +62,7 @@ "LICENSE-CODE", "ThirdPartyNotices.md", "SECURITY.md", + "CONTRIBUTING.md", "lcontent/*.yml", "lcontent/build/*.yml" ] From 9f99275b1208b100479fb0330b7fa71e40534449 Mon Sep 17 00:00:00 2001 From: Den <53200638+localden@users.noreply.github.com> Date: Mon, 21 Aug 2023 16:54:06 -0700 Subject: [PATCH 46/47] Better delineation --- msal-javascript-conceptual/docfx.json | 40 +++++++++++++++++++++++++-- 1 file changed, 38 insertions(+), 2 deletions(-) diff --git a/msal-javascript-conceptual/docfx.json b/msal-javascript-conceptual/docfx.json index 0812501..382d278 100644 --- a/msal-javascript-conceptual/docfx.json +++ b/msal-javascript-conceptual/docfx.json @@ -6,6 +6,13 @@ "dest": "msal-angular", "files": [ "**/*.md" + ], + "exclude": [ + "**/README.md", + "**/CHANGELOG.md", + "**/LICENSE.md", + "**/SECURITY.md", + "**/CONTRIBUTING.md" ] }, { @@ -13,6 +20,13 @@ "dest": "msal-browser", "files": [ "**/*.md" + ], + "exclude": [ + "**/README.md", + "**/CHANGELOG.md", + "**/LICENSE.md", + "**/SECURITY.md", + "**/CONTRIBUTING.md" ] }, { @@ -20,6 +34,9 @@ "dest": "msal-common", "files": [ "**/*.md" + ], + "exclude": [ + ] }, { @@ -27,6 +44,13 @@ "dest": "msal-node", "files": [ "**/*.md" + ], + "exclude": [ + "**/README.md", + "**/CHANGELOG.md", + "**/LICENSE.md", + "**/SECURITY.md", + "**/CONTRIBUTING.md" ] }, { @@ -34,6 +58,13 @@ "dest": "msal-react", "files": [ "**/*.md" + ], + "exclude": [ + "**/README.md", + "**/CHANGELOG.md", + "**/LICENSE.md", + "**/SECURITY.md", + "**/CONTRIBUTING.md" ] }, { @@ -41,6 +72,13 @@ "dest": "extensions", "files": [ "**/*.md" + ], + "exclude": [ + "**/README.md", + "**/CHANGELOG.md", + "**/LICENSE.md", + "**/SECURITY.md", + "**/CONTRIBUTING.md" ] }, { @@ -49,8 +87,6 @@ "**/*.yml" ], "exclude": [ - "CHANGELOG.md", - "LICENSE.md", "**/obj/**", "**/includes/**", "_themes/**", From 4f111a029b285421c0429bba17d900a9b55e8482 Mon Sep 17 00:00:00 2001 From: Den <53200638+localden@users.noreply.github.com> Date: Mon, 21 Aug 2023 16:59:10 -0700 Subject: [PATCH 47/47] Update docfx.json --- msal-javascript-conceptual/docfx.json | 50 +++++---------------------- 1 file changed, 8 insertions(+), 42 deletions(-) diff --git a/msal-javascript-conceptual/docfx.json b/msal-javascript-conceptual/docfx.json index 382d278..4ac280c 100644 --- a/msal-javascript-conceptual/docfx.json +++ b/msal-javascript-conceptual/docfx.json @@ -6,13 +6,6 @@ "dest": "msal-angular", "files": [ "**/*.md" - ], - "exclude": [ - "**/README.md", - "**/CHANGELOG.md", - "**/LICENSE.md", - "**/SECURITY.md", - "**/CONTRIBUTING.md" ] }, { @@ -20,13 +13,6 @@ "dest": "msal-browser", "files": [ "**/*.md" - ], - "exclude": [ - "**/README.md", - "**/CHANGELOG.md", - "**/LICENSE.md", - "**/SECURITY.md", - "**/CONTRIBUTING.md" ] }, { @@ -34,9 +20,6 @@ "dest": "msal-common", "files": [ "**/*.md" - ], - "exclude": [ - ] }, { @@ -44,13 +27,6 @@ "dest": "msal-node", "files": [ "**/*.md" - ], - "exclude": [ - "**/README.md", - "**/CHANGELOG.md", - "**/LICENSE.md", - "**/SECURITY.md", - "**/CONTRIBUTING.md" ] }, { @@ -58,13 +34,6 @@ "dest": "msal-react", "files": [ "**/*.md" - ], - "exclude": [ - "**/README.md", - "**/CHANGELOG.md", - "**/LICENSE.md", - "**/SECURITY.md", - "**/CONTRIBUTING.md" ] }, { @@ -72,13 +41,6 @@ "dest": "extensions", "files": [ "**/*.md" - ], - "exclude": [ - "**/README.md", - "**/CHANGELOG.md", - "**/LICENSE.md", - "**/SECURITY.md", - "**/CONTRIBUTING.md" ] }, { @@ -87,20 +49,24 @@ "**/*.yml" ], "exclude": [ + "**/README.md", + "**/CHANGELOG.md", + "**/LICENSE.md", + "**/SECURITY.md", + "**/CONTRIBUTING.md", "**/obj/**", "**/includes/**", "_themes/**", "_themes.pdf/**", "**/docfx.json", "_repo.en-us/**", - "README.md", "LICENSE", "LICENSE-CODE", "ThirdPartyNotices.md", - "SECURITY.md", - "CONTRIBUTING.md", "lcontent/*.yml", - "lcontent/build/*.yml" + "lcontent/build/*.yml", + "lcontent/extensions/msal-node-extensions/**", + "lcontent/extensions/samples/**" ] } ],