You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The `authority` string that you need to supplant to MSAL app configuration is not explicitly listed among the **Endpoint** links on `Azure Portal/AzureAD/App Registration/Overview` page. It is simply the domain part of a `/token` or `/authorize` endpoint, followed by the tenant name or ID e.g. `https://login.microsoftonline.com/common`.
241
241
242
+
## What does authority string default to if I provide "authority" and "azureCloudOptions"?
243
+
244
+
If the developer provides `azureCloudOptions`, MSAL.js will overwrite any value provided in the `authority`. MSAL.js will also give preference to the parameters provided in a `request` over `configuration`. Please note that if `azureCloudOptions` are set in the configuration, they will take precedence over `authority` in the `request`. If the developer needs to overwrite this, they need to set `azureCloudOptions` in the `request`.
245
+
242
246
## What should I set my `redirectUri` to?
243
247
244
248
When you attempt to authenticate MSAL will navigate to your IDP's sign in page either in the current window, a popup window or a hidden iframe depending on whether you used a redirect, popup or silent API respectively. When authentication is complete the IDP will redirect the window to the `redirectUri` specified in the request with the authentication response in the url hash. You can use any page in your application as your `redirectUri` but there are some additional considerations you should be aware of depending on which API you are using. All pages used as a `redirectUri`**must** be registered as a Reply Url of type "SPA" on your app registration.
@@ -262,7 +266,7 @@ The library is built to specifically use the fragment response mode. This is a s
262
266
263
267
## How do I configure the position and dimensions of popups?
264
268
265
-
A popup window's position and dimension can be configured by passing the height, width, top position, and left position in the request. If no configurations are passed, MSAL defaults will be used. See the request documentation for [PopupRequest](https://azuread.github.io/microsoft-authentication-library-for-js/ref/modules/_azure_msal_browser.html#popuprequest) and [EndSessionPopupRequest](https://azuread.github.io/microsoft-authentication-library-for-js/ref/modules/_azure_msal_browser.html#endsessionpopuprequest) for more details.
269
+
A popup window's position and dimension can be configured by passing the height, width, top position, and left position in the request. If no configurations are passed, MSAL defaults will be used. See the request documentation for [PopupRequest](https://azuread.github.io/microsoft-authentication-library-for-js/ref/modules/_azure_msal_browser.html#popuprequest) and [EndSessionPopupRequest](https://azuread.github.io/microsoft-authentication-library-for-js/ref/modules/_azure_msal_browser.html#endsessionpopuprequest) for more details.
266
270
267
271
Note that popup dimensions should be positioned on screen and sized smaller than the parent window. Popups that are positioned off-screen or larger than the parent window will use MSAL defaults instead.
## I'm seeing scopes `openid`, `profile`, `email`, `offline_access` and `User.Read` in my tokens, even though I haven't requested them. What are they?
314
318
315
-
The first four (`openid`, `profile`, `email` and `offline_access`) are called **default scopes**. They are added to Azure AD as part of Azure AD - OAuth 2.0/OpenID Connect compliance. They are **not** part of any particular API. You can read more about them [here](https://openid.net/specs/openid-connect-core-1_0.html).
319
+
The first four (`openid`, `profile`, `email` and `offline_access`) are called **default scopes**. They are added to Azure AD as part of Azure AD - OAuth 2.0/OpenID Connect compliance. They are **not** part of any particular API. You can read more about them [here](https://openid.net/specs/openid-connect-core-1_0.html).
316
320
317
321
The scope `User.Read`, on the other hand, is an MS Graph API scope. It is also added by default to every app registration. However if your application is not calling MS Graph API, you can simply ignore it.
318
322
@@ -366,7 +370,7 @@ Our recommendation is to move to the new password reset experience since it simp
Copy file name to clipboardExpand all lines: lib/msal-browser/docs/configuration.md
+1
Original file line number
Diff line number
Diff line change
@@ -73,6 +73,7 @@ const msalInstance = new PublicClientApplication(msalConfig);
73
73
|`navigateToLoginRequestUrl`| If `true`, will navigate back to the original request location before processing the authorization code response. If the `redirectUri` is the same as the original request location, this flag should be set to false. | boolean |`true`|
74
74
|`clientCapabilities`| Array of capabilities to be added to all network requests as part of the `xms_cc` claims request | Array of strings |[]|
75
75
|`protocolMode`| Enum representing the protocol mode to use. If `"AAD"`, will function on the OIDC-compliant AAD v2 endpoints; if `"OIDC"`, will function on other OIDC-compliant endpoints. | string |`"AAD"`|
76
+
| `azureCloudOptions` | A defined set of azure cloud options for developers to default to their specific cloud authorities, for specific clouds supported please refer to the [AzureCloudInstance](aka.ms/msaljs/azure_cloud_instance) | [AzureCloudOptions](https://azuread.github.io/microsoft-authentication-library-for-js/ref/modules/_azure_msal_common.html#azurecloudoptions) | [AzureCloudInstance.None](msaljs/azure_cloud_instance)
* - authority - You can configure a specific authority, defaults to " " or "https://login.microsoftonline.com/common"
22
22
* - knownAuthorities - An array of URIs that are known to be valid. Used in B2C scenarios.
23
23
* - cloudDiscoveryMetadata - A string containing the cloud discovery response. Used in AAD scenarios.
24
-
* - redirectUri - The redirect URI where authentication responses can be received by your application. It must exactly match one of the redirect URIs registered in the Azure portal.
25
-
* - postLogoutRedirectUri - The redirect URI where the window navigates after a successful logout.
26
-
* - navigateToLoginRequestUrl - Boolean indicating whether to navigate to the original request URL after the auth server navigates to the redirect URL.
27
-
* - clientCapabilities - Array of capabilities which will be added to the claims.access_token.xms_cc request property on every network request.
28
-
* - protocolMode - Enum that represents the protocol that msal follows. Used for configuring proper endpoints.
24
+
* - redirectUri - The redirect URI where authentication responses can be received by your application. It must exactly match one of the redirect URIs registered in the Azure portal.
25
+
* - postLogoutRedirectUri - The redirect URI where the window navigates after a successful logout.
26
+
* - navigateToLoginRequestUrl - Boolean indicating whether to navigate to the original request URL after the auth server navigates to the redirect URL.
27
+
* - clientCapabilities - Array of capabilities which will be added to the claims.access_token.xms_cc request property on every network request.
28
+
* - protocolMode - Enum that represents the protocol that msal follows. Used for configuring proper endpoints.
29
29
*/
30
30
exporttypeBrowserAuthOptions={
31
31
clientId: string;
@@ -38,14 +38,15 @@ export type BrowserAuthOptions = {
38
38
navigateToLoginRequestUrl?: boolean;
39
39
clientCapabilities?: Array<string>;
40
40
protocolMode?: ProtocolMode;
41
+
azureCloudOptions?: AzureCloudOptions;
41
42
};
42
43
43
44
/**
44
45
* Use this to configure the below cache configuration options:
45
46
*
46
-
* - cacheLocation - Used to specify the cacheLocation user wants to set. Valid values are "localStorage" and "sessionStorage"
47
-
* - storeAuthStateInCookie - If set, MSAL stores the auth request state required for validation of the auth flows in the browser cookies. By default this flag is set to false.
48
-
* - secureCookies - If set, MSAL sets the "Secure" flag on cookies so they can only be sent over HTTPS. By default this flag is set to false.
47
+
* - cacheLocation - Used to specify the cacheLocation user wants to set. Valid values are "localStorage" and "sessionStorage"
48
+
* - storeAuthStateInCookie - If set, MSAL stores the auth request state required for validation of the auth flows in the browser cookies. By default this flag is set to false.
49
+
* - secureCookies - If set, MSAL sets the "Secure" flag on cookies so they can only be sent over HTTPS. By default this flag is set to false.
0 commit comments