Skip to content
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ public void ValidateDefaultAzureCredentialAZURE_TOKEN_CREDENTIALS_Honored_WithBr
Assert.IsTrue(chain.Any(cred => cred is VisualStudioCredential));
Assert.IsTrue(chain.Any(cred => cred is AzureDeveloperCliCredential));
Assert.IsTrue(chain.Any(cred => cred.GetType() == typeof(VisualStudioCodeCredential)));
Assert.IsFalse(chain.Any(cred => cred.GetType() == typeof(InteractiveBrowserCredential)));
Assert.IsTrue(chain.Any(cred => cred.GetType() == typeof(InteractiveBrowserCredential)));
}
else if (credSelection == Constants.ProdCredentials)
{
Expand Down
2 changes: 2 additions & 0 deletions sdk/identity/Azure.Identity/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@

### Bugs Fixed

- `BrokerCredential` is now included in the chain when `AZURE_TOKEN_CREDENTIALS` is set to `dev` and the `Azure.Identity.Broker` package is installed.

### Other Changes

## 1.15.0 (2025-08-11)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,14 +38,21 @@ public TokenCredential[] CreateCredentialChain()
{
if (_useDevCredentials)
{
return
[
var devCredentials = new List<TokenCredential>
{
CreateVisualStudioCredential(),
CreateVisualStudioCodeCredential(),
CreateAzureCliCredential(),
CreateAzurePowerShellCredential(),
CreateAzureDeveloperCliCredential()
];
};

if (TryCreateDevelopmentBrokerOptions(out InteractiveBrowserCredentialOptions brokerOptions))
{
devCredentials.Add(CreateBrokerCredential(brokerOptions));
}

return devCredentials.ToArray();
}
else if (_useProdCredentials)
{
Expand Down Expand Up @@ -98,6 +105,10 @@ public TokenCredential[] CreateCredentialChain()
{
chain.Add(CreateManagedIdentityCredential());
}
if (!Options.ExcludeBrokerCredential && TryCreateDevelopmentBrokerOptions(out InteractiveBrowserCredentialOptions brokerOptions))
{
chain.Add(CreateBrokerCredential(brokerOptions));
}
}

if (!_useProdCredentials)
Expand Down