Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

base_url not work #102

Open
guochao-chen opened this issue Oct 30, 2024 · 1 comment
Open

base_url not work #102

guochao-chen opened this issue Oct 30, 2024 · 1 comment

Comments

@guochao-chen
Copy link

When I use "class: octodns_azure.AzurePrivateProvider", I set the base_url: "https://management.chinacloudapi.cn" to use Azure China API. It did not work, still used the default API "https://management.azure.com", reported error
Image
"azure.core.exceptions.ClientAuthenticationError: Authentication failed: AADSTS500011: The resource principal named https://management.azure.com was not found in the tenant named "

add code "credential_scopes = [self._base_url + "/.default"]" into the init.py , it was fixed.
Image

Is it an issue?

@ross
Copy link
Contributor

ross commented Oct 30, 2024

That seems like an issue and a good fix. Do you know if the same needs to happen for the non-private client path:

self._dns_client = DnsManagementClient(
credential=self._client_credential,
subscription_id=self._client_subscription_id,
retry_policy=self._dns_client_retry_policy,
base_url=self._base_url,
)

A PR would be welcome. I won't be able to test it against Azure China, but I can verify that it still works correctly with the default.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants