Skip to content

Commit 1bad129

Browse files
authored
Update msal-client-exception-failed-to-get-user-name.md
1 parent 3b839aa commit 1bad129

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

support/entra/entra-id/app-integration/msal-client-exception-failed-to-get-user-name.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,9 @@ To resolve this issue, pass the username to `AcquireTokenByIntegratedWindowsAuth
4343

4444
If the username is known beforehand, you can manually pass it to MSAL as follows:
4545

46-
`result = await app.AcquireTokenByIntegratedWindowsAuth(scopes).WithUsername("<service-account>@contoso.com")`
46+
```csharp
47+
result = await app.AcquireTokenByIntegratedWindowsAuth(scopes).WithUsername("<service-account>@contoso.com")
48+
```
4749

4850
If the username isn't known beforehand, dynamically retrieve the username and then pass it to `AcquireTokenByIntegratedWindowsAuth` by using one of the following methods:
4951

0 commit comments

Comments
 (0)