Get Azure Storage Account Regions using c#

Roy_Jaze 40 Reputation points
2024-07-20T04:13:51.0866667+00:00

I need help with getting a list of all storage account regions using c# code. I tried creating a storage account in an unavailable location and catching the exception to get the regions, but I'm wondering if there's a better way to do this? Can someone share c# code that retrieves all the regions? Thanks in advance.

Attached are some screenshots for reference:

Screenshot 2024-07-20 093345

User's image

User's image

Azure Storage Explorer
Azure Storage Explorer
An Azure tool that is used to manage cloud storage resources on Windows, macOS, and Linux.
242 questions
Azure Storage Accounts
Azure Storage Accounts
Globally unique resources that provide access to data management services and serve as the parent namespace for the services.
2,911 questions
Azure Blob Storage
Azure Blob Storage
An Azure service that stores unstructured data in the cloud as blobs.
2,615 questions
0 comments No comments
{count} votes