Share via

Azure Python SDK doesn't return a region available on the website

Oza, Krishna 20 Reputation points
2025-05-16T12:30:05.9366667+00:00

I am using Azure SDK to get the list of all supported regions however the SDK does not return the swedensouth region.

The API call that I am using is self.subscription_client.subscriptions.list_locations(subscription_id=self.subscription_id)

Azure API Management
Azure API Management

An Azure service that provides a hybrid, multi-cloud management platform for APIs.


1 answer

Sort by: Most helpful
  1. Ranashekar Guda 2,905 Reputation points Moderator
    2025-05-26T06:54:13.3233333+00:00

    Hello @Oza, Krishna,
    Thank you for the clarification and for sharing the specific implementation details. Based on your observations, it's important to note that the SubscriptionClient.subscriptions.list_locations() method in the Azure Python SDK returns the list of regions that are available specifically to your subscription, not the complete set of all Azure public regions. This behavior is by design. While a region like Sweden South (swedensouth) may be publicly documented on the Azure website, it may not appear in the SDK/API response if your subscription has not been onboarded or granted access to that region. Access to certain regions can be restricted based on subscription type, regional availability, or organizational policies, and sometimes requires manual onboarding or quota approval.

    To confirm whether your subscription has access to Sweden South, you can use the Azure CLI command az account list-locations --query "[?name=='swedensouth']" -o table, which will indicate whether this region is accessible to your current subscription. As for the presence of regions like brazilus in the SDK response despite not being listed on the public Azure regions page, this may occur because some regions are in limited preview, internal use, or early stages of rollout and thus may not yet be publicly advertised.
    If you found the response helpful, please click Accept Answer and Yes for the provided answer. This will help other community members with similar issues find the solution more easily.

    Was this answer helpful?

    1 person found this answer helpful.
    0 comments No comments

Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.