-
Notifications
You must be signed in to change notification settings - Fork 6k
Extracted broker auth into new doc #48046
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
Co-authored-by: Genevieve Warren <[email protected]>
Co-authored-by: Scott Addie <[email protected]>
Co-authored-by: Scott Addie <[email protected]>
Co-authored-by: Scott Addie <[email protected]>
1. In **Custom redirect URIs**, enter the following WAM redirect URI: | ||
|
||
```text | ||
ms-appx-web://Microsoft.AAD.BrokerPlugin/{client_id} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This redirect URI differs by OS: https://github.com/Azure/azure-sdk-for-net/tree/main/sdk/identity/Azure.Identity.Broker#redirect-uris. When you add the OS zone pivot, no need to list WSL. That detail should appear when Linux is selected. Linux broker prereqs are listed at https://learn.microsoft.com/en-us/entra/msal/dotnet/acquiring-tokens/desktop-mobile/linux-dotnet-sdk.
|
||
The previous example shows how to enable sign-in with the default system account: | ||
|
||
:::code language="csharp" source="../snippets/authentication/brokered/console-app/Program.cs" range="22-28" ::: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this part can be reused for all 3 languages to simplify the doc.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Are you suggesting using a console app for all 3 OSes?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No, I was referring to the fact that it seems all three OS still use the same parameter, so it doesn't matter which code snippet we pull as long as it includes the UseDefaultBrokerAccount
:
InteractiveBrowserCredentialBrokerOptions options = new(hwnd)
{
UseDefaultBrokerAccount = true,
};
|
||
:::zone target="docs" pivot="os-windows" | ||
|
||
:::code language="csharp" source="../snippets/authentication/brokered/maui-app/MainPage.xaml.cs" highlight="37-49" ::: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Since it's covered in the "Authenticate the default system account" section below, don't see the UseDefaultBrokerAccount property here. See my suggested edits in the code.
<PackageReference Include="Azure.Identity" /> | ||
<PackageReference Include="Azure.Identity.Broker" /> | ||
<PackageReference Include="Azure.Security.KeyVault.Secrets" /> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
<PackageReference Include="Azure.Identity" /> | |
<PackageReference Include="Azure.Identity.Broker" /> | |
<PackageReference Include="Azure.Security.KeyVault.Secrets" /> | |
<PackageReference Include="Azure.Identity" /> | |
<PackageReference Include="Azure.Identity.Broker" /> | |
<PackageReference Include="Azure.Security.KeyVault.Secrets" /> |
Co-authored-by: Scott Addie <[email protected]>
Co-authored-by: Scott Addie <[email protected]>
Summary
Describe your changes here.
Fixes #Issue_Number (if available)
Internal previews