-
Notifications
You must be signed in to change notification settings - Fork 3.3k
ClientSecretCredential.get_token() fails in case of azurestack if we provide 'authority' URL #22625
Copy link
Copy link
Closed
Labels
Azure.IdentityClientThis issue points to a problem in the data-plane of the library.This issue points to a problem in the data-plane of the library.customer-reportedIssues that are reported by GitHub users external to the Azure organization.Issues that are reported by GitHub users external to the Azure organization.issue-addressedWorkflow: The Azure SDK team believes it to be addressed and ready to close.Workflow: The Azure SDK team believes it to be addressed and ready to close.questionThe issue doesn't require a change to the product in order to be resolved. Most issues start as thatThe issue doesn't require a change to the product in order to be resolved. Most issues start as that
Metadata
Metadata
Assignees
Labels
Azure.IdentityClientThis issue points to a problem in the data-plane of the library.This issue points to a problem in the data-plane of the library.customer-reportedIssues that are reported by GitHub users external to the Azure organization.Issues that are reported by GitHub users external to the Azure organization.issue-addressedWorkflow: The Azure SDK team believes it to be addressed and ready to close.Workflow: The Azure SDK team believes it to be addressed and ready to close.questionThe issue doesn't require a change to the product in order to be resolved. Most issues start as thatThe issue doesn't require a change to the product in order to be resolved. Most issues start as that
Describe the bug
To authenticate python SDK to azure Stack hub we use ClientSecretCredential method and pass required parameters like
ClientSecretCredential( tenant_id=tenantid, client_id=clientid, client_secret=secretkey, cloud_environment=cloud, authority=auth_resource).when user pass authority url 'https://management.private_domain.onmicrosoft.com/<b9ae38c5-####>' parameter expilicitly the ClientSecretCredential.get_token() method throwing an error instead of successful response.
ClientSecretCredential.get_token failed: Authentication failed: invalid_instance: The authority you provided, https://management.private_domain.onmicrosoft.com/<b9ae38c5-####>/<ed83b0eb-tenant_id>, is not whitelisted. If it is indeed your legit customized domain name, you can turn off this check by passing in validate_authority=False.
looks like the azure sdk explicitly appending tenant_id to the authority URL.
can you please provide us more information about the change and how user can pass the authority URL.
if we dont pass 'authority URL' then its working but with authority URL it fails.
To Reproduce
Steps to reproduce the behavior:
Expected behavior
ClientSecretCredential.get_token() should work if user pass the authority URL.