Skip to content

Conversation

alexwolfmsft
Copy link
Contributor

@alexwolfmsft alexwolfmsft commented Aug 20, 2025

@alexwolfmsft alexwolfmsft reopened this Aug 20, 2025
@alexwolfmsft alexwolfmsft marked this pull request as ready for review August 20, 2025 19:14
Co-authored-by: Genevieve Warren <[email protected]>
1. In **Custom redirect URIs**, enter the following WAM redirect URI:

```text
ms-appx-web://Microsoft.AAD.BrokerPlugin/{client_id}
Copy link
Member

@scottaddie scottaddie Aug 22, 2025

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.

@alexwolfmsft alexwolfmsft requested a review from jsquire as a code owner August 25, 2025 15:22
@alexwolfmsft alexwolfmsft marked this pull request as draft August 25, 2025 16:23

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" :::
Copy link
Contributor Author

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.

Copy link
Member

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?

Copy link
Contributor Author

@alexwolfmsft alexwolfmsft Aug 26, 2025

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" :::
Copy link
Member

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.

Comment on lines 9 to 11
<PackageReference Include="Azure.Identity" />
<PackageReference Include="Azure.Identity.Broker" />
<PackageReference Include="Azure.Security.KeyVault.Secrets" />
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
<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" />

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants