[BUG] Setting DefaultAzureCredentialOptions.TenantId twice leads to InvalidOperationException #47035
Labels
Azure.Identity
Client
This issue points to a problem in the data-plane of the library.
customer-reported
Issues that are reported by GitHub users external to the Azure organization.
needs-team-attention
Workflow: This issue needs attention from Azure service team or SDK team
question
The issue doesn't require a change to the product in order to be resolved. Most issues start as that
Library name and version
Azure.Identity 1.13.1
Describe the bug
I have code that essentially does:
Which leads to the following error:
I obviously can refactor the code to just set
TenantId
exactly once, but I shouldn't have to.From looking at the code, setting
TenantId
also sets_interactiveBrowserTenantId.Value
. SettingTenantId
again throws due to this logic in the setter:Since
_interactiveBrowserTenantId
is set from the first setting ofTenantId
, but I did NOT setInteractiveBrowserTenantId
directly, I consider this a bug.Expected behavior
For it not to throw.
Actual behavior
Exception
Reproduction Steps
See above
Environment
No response
The text was updated successfully, but these errors were encountered: