Azure (Resource Manager deployments)

Azure StorageAccountAlreadyTaken: storage account name already taken

Azure StorageAccountAlreadyTaken means the storage account name is already used somewhere in Azure. Names must be globally unique; build one with uniqueString.

By EpiFive Editorial TeamSources checked How we check our guides

What the error means

StorageAccountAlreadyTaken is the Azure Resource Manager error for a storage account name that is already in use. Microsoft's storage account name article says you get it if you try to deploy a new storage account with the same name as a storage account that already exists in Azure, and that the existing account might be in your subscription or tenant, or anywhere across Azure. The message reads "The storage account named ... is already taken." The common errors table lists it next to StorageAccountAlreadyExists with one mitigation: provide a unique name for the storage account.

The reason is that storage account names must be globally unique across Azure, not just within your subscription. Short, readable names such as a company name plus "storage" are very likely to be taken by someone else already, which is why templates that hard-code a name often fail on the first deployment in a new environment.

The same article covers related storage name codes that need different fixes. AccountNameInvalid means the name has characters that are not allowed. InvalidResourceLocation means you reused a name in the same resource group with a different location. StorageAccountInAnotherResourceGroup means the name exists in another resource group of your own subscription.

Common causes

Microsoft names two main causes:

  • The name is a duplicate of an existing storage account somewhere in Azure, or it uses invalid characters. Names must be 3 to 24 characters, lowercase letters and numbers only, and globally unique.
  • The storage account was recently deleted, and the new request comes from a different subscription and tenant than the one where it was previously located. Microsoft says such requests are denied for security purposes, to prevent dangling DNS entries and subdomain takeover.

How to fix it

1. Choose a different, valid name

Pick a name that is 3 to 24 characters long and uses only lowercase letters and numbers. If you deploy by hand, try a more specific name. In a template, avoid hard-coded names and generate one instead, as in the next step.

2. Generate a unique name with uniqueString

Microsoft recommends concatenating a prefix or suffix with the value of the uniqueString function. In Bicep:

name: 'storage${uniqueString(resourceGroup().id)}'

In an ARM template:

"name": "[concat('storage', uniqueString(resourceGroup().id))]",

3. Keep the name within 24 characters

uniqueString returns 13 characters, so a prefix or suffix must be 11 characters or less. Microsoft's example limits a storageNamePrefix parameter with @maxLength(11) in Bicep, or "maxLength": 11 in JSON, and then builds the name:

name: '${storageNamePrefix}${uniqueString(resourceGroup().id)}'

4. Recently deleted account in another tenant: open a support request

If the name belonged to an account that was recently deleted and you need that exact name from a different subscription and tenant, create a support request. Microsoft says to choose Create new storage account as the problem type and Failure(s) during new account creation as the subtype, and to include the storage account name and the approximate time the creation failed.

If nothing works

If the deployment now fails with AccountNameInvalid, the generated name has characters or a length that is not allowed; check the prefix. If it fails with InvalidResourceLocation or StorageAccountInAnotherResourceGroup, the name already exists in your own subscription, so pick a new name or deploy to the existing account's resource group and location. As a general step, run az storage account check-name --name <name> to test a name before deploying.

What we checked

Two Microsoft Learn pages were read. "Resolve errors for storage account names" shows the StorageAccountAlreadyTaken message, the global uniqueness and naming rules, the recently deleted account cause, the uniqueString examples for Bicep and ARM templates, and the support request route. "Troubleshoot common Azure deployment errors" lists StorageAccountAlreadyTaken with the unique name mitigation. The error was not reproduced for this page.

Last checked: 2026-11-21.

Official sources

Questions people ask

The name is not used in my subscription. Why is it taken?

Storage account names must be globally unique across Azure. Microsoft says the existing account might be in your subscription or tenant, or anywhere across Azure.

I deleted the storage account. Why can't I reuse the name?

Microsoft says a request to create a recently deleted account name from a different subscription and tenant is denied for security reasons, to prevent dangling DNS entries and subdomain takeover. For that case, open a support request.

How long can a storage account name be?

Between 3 and 24 characters, using only lowercase letters and numbers. The uniqueString function returns 13 characters, so a prefix or suffix should be 11 characters or less.

Not your code?

Search the error code library, or report a code we don't cover. Spotted something out of date on this page? Report a correction.