Skip to content

Commit 501284a

Browse files
authored
Maintenance of Azure Identity library sample apps (#42368)
1 parent f6fc38c commit 501284a

18 files changed

+60
-44
lines changed

docs/azure/sdk/authentication/additional-methods.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ Perform the following steps to enable the application to authenticate through th
3333

3434
The following example demonstrates using an [`InteractiveBrowserCredential`](/dotnet/api/azure.identity.interactivebrowsercredential) to authenticate with the [`BlobServiceClient`](/dotnet/api/azure.storage.blobs.blobserviceclient):
3535

36-
:::code language="csharp" source="../snippets/additional-auth/interactive/InteractiveBrowserAuth.cs" highlight="15-17":::
36+
:::code language="csharp" source="../snippets/authentication/additional-auth/interactive/InteractiveBrowserAuth.cs" highlight="15-17":::
3737

3838
For more exact control, such as setting redirect URIs, you can supply specific arguments to `InteractiveBrowserCredential` such as `redirect_uri`.
3939

@@ -82,7 +82,7 @@ Perform the following steps to enable the application to authenticate through th
8282
8383
The following example demonstrates using an [`InteractiveBrowserCredential`](/dotnet/api/azure.identity.interactivebrowsercredential?view=azure-dotnet) in a Windows Forms app to authenticate with the [`BlobServiceClient`](/dotnet/api/azure.storage.blobs.blobserviceclient):
8484
85-
:::code language="csharp" source="../snippets/additional-auth/interactive/InteractiveBrokeredAuth.cs" highlight="16-20":::
85+
:::code language="csharp" source="../snippets/authentication/additional-auth/interactive/InteractiveBrokeredAuth.cs" highlight="16-20":::
8686
8787
> [!NOTE]
8888
> Visit the [Parent window handles](/entra/msal/dotnet/acquiring-tokens/desktop-mobile/wam#parent-window-handles) and [Retrieve a window handle](/windows/apps/develop/ui-input/retrieve-hwnd) articles for more information about retrieving window handles.
@@ -99,7 +99,7 @@ Many people always sign in to Windows with the same user account and, therefore,
9999
100100
The following example shows how to enable sign-in with the default system account:
101101
102-
:::code language="csharp" source="../snippets/additional-auth/interactive/SilentBrokeredAuth.cs" highlight="16-24":::
102+
:::code language="csharp" source="../snippets/authentication/additional-auth/interactive/SilentBrokeredAuth.cs" highlight="16-24":::
103103
104104
Once you opt into this behavior, the credential attempts to sign in by asking the underlying Microsoft Authentication Library (MSAL) to perform the sign-in for the default system account. If the sign-in fails, the credential falls back to displaying the account picker dialog, from which the user can select the appropriate account.
105105
@@ -125,4 +125,4 @@ This method authenticates an application using previously collected credentials
125125
>
126126
> Furthermore, this method authenticates only work and school accounts; Microsoft accounts aren't supported. For more information, see [Sign up your organization to use Microsoft Entra ID](/entra/fundamentals/sign-up-organization).
127127
128-
:::code language="csharp" source="../snippets/additional-auth/username-password/Program.cs" highlight="9-11":::
128+
:::code language="csharp" source="../snippets/authentication/additional-auth/username-password/Program.cs" highlight="9-11":::

docs/azure/sdk/snippets/additional-auth/username-password/Program.cs

Lines changed: 0 additions & 16 deletions
This file was deleted.
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
<Project>
2+
<PropertyGroup>
3+
<ManagePackageVersionsCentrally>true</ManagePackageVersionsCentrally>
4+
</PropertyGroup>
5+
<ItemGroup>
6+
<!-- Azure SDK packages -->
7+
<PackageVersion Include="Azure.Identity" Version="1.12.0" />
8+
<PackageVersion Include="Azure.Identity.Broker" Version="1.1.0" />
9+
<PackageVersion Include="Azure.Storage.Blobs" Version="12.21.2" />
10+
<PackageVersion Include="Microsoft.Extensions.Azure" Version="1.7.5" />
11+
12+
<!-- ASP.NET Core packages -->
13+
<PackageVersion Include="Microsoft.AspNetCore.OpenApi" Version="8.0.8" />
14+
<PackageVersion Include="Swashbuckle.AspNetCore" Version="6.7.3" />
15+
</ItemGroup>
16+
</Project>

docs/azure/sdk/snippets/additional-auth/interactive/InteractiveBrokeredAuthSample.csproj renamed to docs/azure/sdk/snippets/authentication/additional-auth/interactive/InteractiveBrokeredAuth.csproj

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,9 @@
99
</PropertyGroup>
1010

1111
<ItemGroup>
12-
<PackageReference Include="Azure.Identity" Version="1.12.0" />
13-
<PackageReference Include="Azure.Identity.Broker" Version="1.1.0" />
14-
<PackageReference Include="Azure.Storage.Blobs" Version="12.21.2" />
12+
<PackageReference Include="Azure.Identity" />
13+
<PackageReference Include="Azure.Identity.Broker" />
14+
<PackageReference Include="Azure.Storage.Blobs" />
1515
</ItemGroup>
1616

1717
</Project>

0 commit comments

Comments
 (0)