Skip to content

Commit ea71a40

Browse files
authored
Merge pull request #82647 from Rinki-MSFT/patch-1
Update doc with equivalent prompt behavior in MSAL
2 parents 2808459 + 345d7f6 commit ea71a40

File tree

1 file changed

+13
-1
lines changed

1 file changed

+13
-1
lines changed

articles/active-directory/develop/msal-net-differences-adal-net.md

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -136,7 +136,7 @@ Using MSAL.NET, you catch `MsalUiRequiredException` as described in [AcquireToke
136136
```csharp
137137
catch(MsalUiRequiredException exception)
138138
{
139-
try {try to authenticate interactively}
139+
try {"try to authenticate interactively"}
140140
}
141141
```
142142

@@ -157,6 +157,18 @@ catch(AdalException exception)
157157

158158
For details, see [the recommended pattern to acquire a token in public client applications](https://github.com/AzureAD/azure-activedirectory-library-for-dotnet/wiki/AcquireTokenSilentAsync-using-a-cached-token#recommended-pattern-to-acquire-a-token) with ADAL.NET.
159159

160+
### Prompt behavior
161+
162+
Prompt behavior in MSAL.NET is equivalent to prompt behavior in ADAL.NET:
163+
164+
| ADAL.NET | MSAL.NET | Description |
165+
| ----------- | ----------- | -------------|
166+
| `PromptBehavior.Auto`| `NoPrompt`| Azure AD chooses the best behavior (signing in users silently if they are signed in with only one account, or displaying the account selector if they are signed in with several accounts). |
167+
| `PromptBehavior.Always`| `ForceLogin` | Resets the sign-in box and forces the user to reenter their credentials. |
168+
| `PromptBehavior.RefreshSession`| `Consent`| Forces the user to consent again to all permissions. |
169+
| `PromptBehavior.Never`| `Never`| Don't use; instead, use the [recommended pattern for public client apps](scenario-desktop-acquire-token.md?tabs=dotnet). |
170+
| `PromptBehavior.SelectAccount`| `SelectAccount`| Displays the account selector and forces the user to select an account. |
171+
160172
### Handling claim challenge exceptions
161173

162174
At times when acquiring a token, Azure AD throws an exception in case a resource requires more claims from the user (for instance two-factor authentication).

0 commit comments

Comments
 (0)