Skip to content

Conversation

CrCliff
Copy link

@CrCliff CrCliff commented Mar 20, 2025

[AZURE_ARM] Update AD endpoint for Azure US GovCloud

Description

The AZURE_ARM provider was using the incorrect Active Directory endpoint for the Azure US Government environment.

I was seeing the following error when attempting to use the provider with the environment.

cls = get_driver(Provider.AZURE_ARM)
driver = cls(
    cloud_environment="AzureUSGovernment",
    tenant_id="...",
    subscription_id="....",
    key="...",
    secret="...",
)
# BaseHTTPError: Confidential Client is not supported in Cross Cloud request.

The az cloud list command provides the current AD endpoint.

$ az cloud list
  {
    "name": "AzureUSGovernment",
    "endpoints": {
      "activeDirectory": "https://login.microsoftonline.us",
     // ....
    },
    // ...
  },

After updating the endpoint the service principal authenticates as expected.

Status

  • done, ready for review

Checklist

  • Code linting (required, can be done after the PR checks)
  • Documentation
  • Tests
  • ICLA (required for bigger changes)

Use active directory endpoint from `az cloud list` output.
@CrCliff CrCliff changed the title Fix US GovCloud AD endpoint for AZURE_ARM provider Update US GovCloud AD endpoint for AZURE_ARM provider Mar 20, 2025
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

Successfully merging this pull request may close these issues.

1 participant