Skip to content

Commit

Permalink
verbiage
Browse files Browse the repository at this point in the history
  • Loading branch information
alexwolfmsft committed Jan 16, 2024
1 parent 9b3e01d commit c82081f
Showing 1 changed file with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,11 @@ ms.custom: devx-track-dotnet, engagement-fy23
ms.date: 1/16/2024
---

# Create credential types using configuration files
# Create Azure credential types using configuration files

The `Microsoft.Extensions.Azure` library supports creating different <xref:Azure.Core.TokenCredential?displayProperty=fullName> types from values defined in _appsettings.json_ and other configuration files. This article describes the support for different `TokenCredential` types and how to configure the required values for each type.
The `Microsoft.Extensions.Azure` library supports creating different Azure <xref:Azure.Core.TokenCredential?displayProperty=fullName> types from values defined in _appsettings.json_ and other configuration files. This article describes the support for different `TokenCredential` types and how to configure the required values for each type.

## Support for authentication credentials through configuration
## Support for Azure credentials through configuration

The `Microsoft.Extensions.Azure` library can automatically provide Azure service clients with a `TokenCredential` class by searching _appsettings.json_ or other configuration files for credential values using the default `IConfiguration` service for .NET. This approach allows developers to explicitly set credential values across different environments through configuration rather than through app code directly.

Expand All @@ -22,7 +22,7 @@ The following credential types are supported via configuration:
* <xref:Azure.Identity.ClientCertificateCredential?displayProperty=fullName>
* <xref:Azure.Identity.DefaultAzureCredential?displayProperty=fullName>

The configuration file values are only used if the service client doesn't* explicitly set an authentication mechanism. For example, the following code initiates a search for values in _appsettings.json_ because the <xref:Azure.Storage.Blobs.BlobServiceClient?displayProperty=fullName> does not specify any credentials during instantiation:
The configuration file values are only used when the service client doesn't explicitly set an authentication mechanism. For example, the following code uses `IConfiguration` to search for values in _appsettings.json_ at run time because the <xref:Azure.Storage.Blobs.BlobServiceClient?displayProperty=fullName> does not specify credentials during instantiation:

```csharp
// No TokenCredential or access key provided - configuration files will be searched
Expand Down

0 comments on commit c82081f

Please sign in to comment.