Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Azure Subscription ID vs Account ID

I'm working through comparing Azure Subscription IDs and Account IDs. Is it really as simple as the subscription ID relates to the storage name and is unique for each storage container, and the account ID relates to your Azure account? Why do you need them both?

like image 543
m00nbeam360 Avatar asked Feb 13 '23 05:02

m00nbeam360


2 Answers

So I think here are 4 concepts:

Azure Account - either an Microsoft Account (like [email protected], [email protected]), or an Organizational Account (created by Azure AD, if you don't know this you don't need to care). This is what you used to log in to Azure Portal and use the service. Global Unique.

Azure Subscription - more like a billing unit for your Azure Services, including VM, Storage, etc. The identity is a GUID and its name is just for display, no uniqueness required.

Azure Storage Account - used for authentication to Azure Storage with a pair of storage name + storage key. The name is an identity and must be globally unique. You can have multiple storage accounts in a subscription. There are various reasons about why Azure Storage has its own authentication other than use Subscription certificates or Azure Account. One of them is that Azure Storage are more likely accessed by application programmatically which has different requirements of the portal, so name/key or SASToken are used to do authentication here.

Azure Storage Container - like a directory in an Azure Storage Account to group data. Its name should be unique within one account.

like image 122
slepox Avatar answered Feb 20 '23 10:02

slepox


An Azure subscription may have many storage accounts.

A storage account may have many containers.

In order to access the contents of a container, you'll need your corresponding storage account and key. You will not need your subscription credentials to access storage account contents directly.

like image 21
Thinkable Avatar answered Feb 20 '23 11:02

Thinkable