You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: articles/active-directory/develop/msal-js-prompt-behavior.md
+4-4Lines changed: 4 additions & 4 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -18,7 +18,7 @@ ms.custom: aaddev
18
18
19
19
# Prompt behavior with MSAL.js
20
20
21
-
MSAL.js allows passing a prompt value as part of its login or token request methods. Based on your application scenario, you can customize the Azure AD prompt behavior for a request by setting the **prompt** parameter in the request object:
21
+
MSAL.js allows passing a prompt value as part of its login or token request methods. Based on your application scenario, you can customize the Azure AD prompt behavior for a request by setting the **prompt** parameter in the [request object](https://azuread.github.io/microsoft-authentication-library-for-js/ref/modules/_azure_msal_common.html#commonauthorizationurlrequest):
@@ -55,7 +55,7 @@ The following prompt values can be used when authenticating with the Microsoft i
55
55
|`select_account`| Interrupts single sign-on by providing an account selection experience listing all the accounts in session or an option to choose a different account altogether. |
56
56
|`create`| Triggers a sign-up dialog allowing external users to create an account. For more information, see: [Self-service sign-up](../external-identities/self-service-sign-up-overview.md)|
57
57
58
-
MSAL will throw an **invalid_prompt** error for any unsupported prompt values:
58
+
MSAL.js will throw an `invalid_prompt` error for any unsupported prompt values:
59
59
60
60
> invalid_prompt_value: Supported prompt values are 'login', 'select_account', 'consent', 'create' and 'none'. Please see here for valid configuration options: https://azuread.github.io/microsoft-authentication-library-for-js/ref/modules/_azure_msal_common.html#commonauthorizationurlrequest Given value: my_custom_prompt
61
61
@@ -76,9 +76,9 @@ It's important to note that **prompt** is a protocol-level parameter and signals
76
76
77
77
## Interactive requests with prompt=none
78
78
79
-
Generally, when you need to make a silent request, use a silent MSAL method (`ssoSilent`, `acquireTokenSilent`), and handle any *login_required*/*interaction_required* errors with an interactive method (`loginPopup`, `loginRedirect`, `acquireTokenPopup`, `acquireTokenRedirect`).
79
+
Generally, when you need to make a silent request, use a silent MSAL.js method (`ssoSilent`, `acquireTokenSilent`), and handle any *login_required* or *interaction_required* errors with an interactive method (`loginPopup`, `loginRedirect`, `acquireTokenPopup`, `acquireTokenRedirect`).
80
80
81
-
In some cases however, the prompt value `none` can be used together with an interactive MSAL method to achieve silent authentication. For instance, due to the third-party cookie restrictions in some browsers, `ssoSilent` requests will fail despite an active user session with Azure AD. As a remedy, you can pass the prompt value `none` to an interactive request such as `loginPopup`. MSAL then will open a popup window to Azure AD and Azure AD will honor the prompt value by utilizing the existing session cookie.
81
+
In some cases however, the prompt value `none` can be used together with an interactive MSAL.js method to achieve silent authentication. For instance, due to the third-party cookie restrictions in some browsers, `ssoSilent` requests will fail despite an active user session with Azure AD. As a remedy, you can pass the prompt value `none` to an interactive request such as `loginPopup`. MSAL.js will then open a popup window to Azure AD and Azure AD will honor the prompt value by utilizing the existing session cookie.
0 commit comments