Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Don't miss out! 2025 Microsoft Fabric Community Conference, March 31 - April 2, Las Vegas, Nevada. Use code MSCUST for a $150 discount. Prices go up February 11th. Register now.

Reply
Pascal_KTeam
Resolver I
Resolver I

API to retrieve if specific Azure resource type can be deployed in an Azure region

We're building an automated installer application for our Power BI Embedded solution. This installer allows users to select in which Azure region the needed Azure resources are being created. We want to make sure that users can only select Azure Regions where the needed Resources can be created to avoid the installer to fail.
There's a website (https://azure.microsoft.com/en-gb/explore/global-infrastructure/products-by-region/) that shows which resources are available in which region but what we need is an API endpoint to programmatically get the latest information.
Anybody know about such endpoint...?

4 REPLIES 4
Pascal_KTeam
Resolver I
Resolver I

Since this is an installer app, we don't want to list existing resources (because they don't exist yet and will be deployed by the installer app) but need to find out if the required resource type (for example Azure SQL, App Service, Storage Account) can be deployed in the selected region. For example, the installer fails when a specific region is selected (let's say useast) that doesn't support Azure SQL (just an example...)
This is a screenshot of the dropdown with Azure Locations. This list is currently hardcoded but we'd like to find a way to get current status of what can or can't be installed in a specific region to populate the dropdown with the latest information

Pascal_KTeam_0-1731913431539.png

 

Hi, @Pascal_KTeam 

Thank you for your prompt response.

 At present, I have not found a direct API to fulfil your requirements. However, I believe you can try using the following API to check whether it contains the resources you need for your installation:

HEAD https://management.azure.com/{resourceId}?api-version=2021-04-01

For further details, please refer to:

Resources - Check Existence By Id - REST API (Azure Resource Management) | Microsoft Learn

You can then use simple conditional statements to output the results.

if ($availability) {
        Write-Host "$($location.displayName) supports $resourceType"
    } else {
        Write-Host "$($location.displayName) does NOT support $resourceType"
    }


Of course, if you have any new discoveries or questions, please feel free to get in touch with us.
 

Best Regards,

Leroy Lu

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

v-linyulu-msft
Community Support
Community Support

Thanks for the reply from Jai-Rathinavel  please allow me to provide another insight:

Hi, @Pascal_KTeam 

The API mentioned by Jai-Rathinavel  is indeed a good solution.

 

Of course, you might also consider trying the following API:

GET https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/resources?api-version=2021-04-01

This API can retrieve all resources within a resource group. Below is a screenshot from the official documentation:

vlinyulumsft_0-1731906017698.png

For further details, please refer to:

Resources - List By Resource Group - REST API (Azure Resource Management) | Microsoft Learn
 

Additionally, there is another API:

HEAD https://management.azure.com/{resourceId}?api-version=2021-04-01

This one checks whether a resource exists by its ID. Here’s a screenshot from the official documentation:

vlinyulumsft_1-1731906041225.png

For more information, please refer to:

 Resources - Check Existence By Id - REST API (Azure Resource Management) | Microsoft Learn

Of course, if you have any new discoveries or questions, please feel free to get in touch with us.
 

Best Regards,

Leroy Lu

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.


 

Jai-Rathinavel
Super User
Super User

Hi @Pascal_KTeam , You can get information of latest resources and location via Resources - List API the response yields following properties: locationresourceTypenameresourceGroupidentityidentity/principalIdplanplan/publisherplan/productplan/nameplan/version, and plan/promotionCode.

Attached the microsoft documentation below for getting endpoint url. 

https://learn.microsoft.com/en-us/rest/api/resources/resources/list?view=rest-resources-2021-04-01

 

Did I answer your question ?. If yes, please mark my post as a solution

 

Thanks,

Jai




Did I answer your question? Mark my post as a solution!

Proud to be a Super User!





Helpful resources

Announcements
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount! Prices go up Feb. 11th.

Feb2025 Sticker Challenge

Join our Community Sticker Challenge 2025

If you love stickers, then you will definitely want to check out our Community Sticker Challenge!

Jan25PBI_Carousel

Power BI Monthly Update - January 2025

Check out the January 2025 Power BI update to learn about new features in Reporting, Modeling, and Data Connectivity.

Jan NL Carousel

Fabric Community Update - January 2025

Find out what's new and trending in the Fabric community.