Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
43 commits
Select commit Hold shift + click to select a range
5d0038c
[Identity] Adding AdditionallyAllowedTenants to constrain multi-tenan…
schaabs Aug 29, 2022
aaa4257
updating API spec
schaabs Aug 29, 2022
fdb98b1
adding dev-time credentials
schaabs Sep 7, 2022
3b64be6
adding user-auth credentials
schaabs Sep 7, 2022
57d6d1d
refactor additional tenants to base options
schaabs Sep 7, 2022
11a7298
adding default and environment credentials
schaabs Sep 7, 2022
8740be7
update/add tests
schaabs Sep 12, 2022
53ac2ff
update API spec
schaabs Sep 12, 2022
aad7710
update changelog and breaking_changes
schaabs Sep 12, 2022
8c00cd9
update assembly version
schaabs Sep 12, 2022
d651a03
Update sdk/identity/Azure.Identity/CHANGELOG.md
schaabs Sep 12, 2022
4663156
Update sdk/identity/Azure.Identity/CHANGELOG.md
schaabs Sep 12, 2022
1758a66
Update sdk/identity/Azure.Identity/src/Credentials/AuthorizationCodeC…
schaabs Sep 12, 2022
cf3f51d
Update sdk/identity/Azure.Identity/src/TenantIdResolver.cs
schaabs Sep 12, 2022
c70f042
Update sdk/identity/Azure.Identity/CHANGELOG.md
schaabs Sep 13, 2022
da48964
fb
schaabs Sep 14, 2022
8da2477
fb
schaabs Sep 14, 2022
2d90793
fb
schaabs Sep 14, 2022
b2a4235
fb
schaabs Sep 14, 2022
938f72c
fb
schaabs Sep 14, 2022
c0f2e4f
Update sdk/identity/Azure.Identity/src/Credentials/VisualStudioCreden…
schaabs Sep 14, 2022
a6208e9
Update sdk/identity/Azure.Identity/src/Credentials/ClientAssertionCre…
schaabs Sep 14, 2022
39a8ce8
Update sdk/identity/Azure.Identity/src/Credentials/AzurePowerShellCre…
schaabs Sep 14, 2022
038769f
Update sdk/identity/Azure.Identity/src/Credentials/AzurePowerShellCre…
schaabs Sep 14, 2022
98eb043
Update sdk/identity/Azure.Identity/src/Credentials/AzureCliCredential…
schaabs Sep 14, 2022
70dee65
Update sdk/identity/Azure.Identity/CHANGELOG.md
schaabs Sep 14, 2022
a9044bb
Update sdk/identity/Azure.Identity/src/Credentials/VisualStudioCreden…
schaabs Sep 14, 2022
507850e
Update sdk/identity/Azure.Identity/src/Credentials/VisualStudioCodeCr…
schaabs Sep 14, 2022
59cefbe
Update sdk/identity/Azure.Identity/src/Credentials/VisualStudioCodeCr…
schaabs Sep 14, 2022
a51788a
Update sdk/identity/Azure.Identity/src/Credentials/TokenCredentialOpt…
schaabs Sep 14, 2022
6b00e60
Update sdk/identity/Azure.Identity/src/Credentials/UsernamePasswordCr…
schaabs Sep 14, 2022
f62d4e7
Update sdk/identity/Azure.Identity/src/Credentials/OnBehalfOfCredenti…
schaabs Sep 14, 2022
f68371c
Update sdk/identity/Azure.Identity/src/Credentials/InteractiveBrowser…
schaabs Sep 14, 2022
c4f277f
Update sdk/identity/Azure.Identity/src/Credentials/DeviceCodeCredenti…
schaabs Sep 14, 2022
ced25a0
Update sdk/identity/Azure.Identity/src/Credentials/DefaultAzureCreden…
schaabs Sep 14, 2022
a0add20
Update sdk/identity/Azure.Identity/src/Credentials/DefaultAzureCreden…
schaabs Sep 14, 2022
a2df13b
Update sdk/identity/Azure.Identity/src/Credentials/DefaultAzureCreden…
schaabs Sep 14, 2022
d428fab
Update sdk/identity/Azure.Identity/src/Credentials/ClientSecretCreden…
schaabs Sep 14, 2022
74f50d7
Update sdk/identity/Azure.Identity/src/Credentials/ClientCertificateC…
schaabs Sep 14, 2022
48a3b9e
updating troubleshooting.md
schaabs Sep 14, 2022
c62ad15
Merge branch 'feature/additionaltenants' of https://github.com/schaab…
schaabs Sep 14, 2022
8bf00bd
update snippets
schaabs Sep 14, 2022
287bd02
undo snippet indent
schaabs Sep 14, 2022
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
fb
  • Loading branch information
schaabs committed Sep 14, 2022
commit b2a42355e8140d775ab1cd8fcd97daf007e70e83
32 changes: 16 additions & 16 deletions sdk/identity/Azure.Identity/BREAKING_CHANGES.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,26 +17,26 @@ More information on this change and the consideration behind it can be found [he

## 1.7.0

### Changed Credential types supporting multi-tenant authentication to throw `AuthenticationFailedException` if the requested tenant id doesn't match the tenant id of the credential, and is not included in the `AdditionallyAllowedTenants` option.
### Behavioral change to credential types supporting multi-tenant authentication

Starting in Azure.Identity 1.7.0 the default behavior of credentials supporting multi-tenant authentication will be to throw a `AuthenticationFailedExcpetion` if the requested `TenantId` doesn't match the tenant id originally configured on the credential. Applications must now either explicitly add all expected tenant ids to the `AdditionallyAllowedTenants` list in the credential options, or add "*" to enable acquiring tokens from any tenant (the original behavior).
As of `Azure.Identity` 1.7.0, the default behavior of credentials supporting multi-tenant authentication has changed. Each of these credentials will throw an `AuthenticationFailedException` if the requested `TenantId` doesn't match the tenant ID originally configured on the credential. Apps must now do one of the following things:

This is an example of explicitly adding tenants to allow acquiring tokens.
- Add all IDs, of tenants from which tokens should be acquired, to the `AdditionallyAllowedTenants` list in the credential options. For example:

```C# Snippet:Identity_BreakingChanges_AddExplicitAdditionallyAllowedTenants
var credential = new DefaultAzureCredential(new DefaultAzureCredentialOptions
{
AdditionallyAllowedTenants = { "00000000-0000-0000-0000-000000000000", "11111111-1111-1111-1111-111111111111" }
});
```
```C# Snippet:Identity_BreakingChanges_AddExplicitAdditionallyAllowedTenants
var credential = new DefaultAzureCredential(new DefaultAzureCredentialOptions
{
AdditionallyAllowedTenants = { "<tenant_id_1>", "<tenant_id_2>" }
});
```

Here is an example of using the wildcard to enable acquiring tokens from any tenant, to be compatible with versions 1.5.0 through 1.6.1.
- Add `*` to enable token acquisition from any tenant. This is the original behavior and is compatible with versions 1.5.0 through 1.6.1. For example:

```C# Snippet:Identity_BreakingChanges_AddAllAdditionallyAllowedTenants
var credential = new DefaultAzureCredential(new DefaultAzureCredentialOptions
{
AdditionallyAllowedTenants = { "*" }
});
```
```C# Snippet:Identity_BreakingChanges_AddAllAdditionallyAllowedTenants
var credential = new DefaultAzureCredential(new DefaultAzureCredentialOptions
{
AdditionallyAllowedTenants = { "*" }
});
```

Note: Credential types which do not require a `TenantId` on construction will only throw `AuthenticationFailedException` when the application has provided a value for `TenantId` either in the options or via a constructor overload. If no `TenantId` is specified when constructing the credential, the credential will acquire tokens for any requested `TenantId` regardless of the value of `AdditionallyAllowedTenants`.
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ public void AddExplicitAdditionallyAllowedTenants()
#region Snippet:Identity_BreakingChanges_AddExplicitAdditionallyAllowedTenants
var credential = new DefaultAzureCredential(new DefaultAzureCredentialOptions
{
AdditionallyAllowedTenants = { "00000000-0000-0000-0000-000000000000", "11111111-1111-1111-1111-111111111111" }
AdditionallyAllowedTenants = { "<tenant_id_1>", "<tenant_id_2>" }
});
#endregion
}
Expand Down