AuthorizationResourceTypeMismatch

John Fabiani 25 Reputation points
2026-07-30T18:23:25.5466667+00:00

How do I deal with this error? I am able to login using azcopy but when I attempt copy data I get this error "AuthorizationResourceTypeMismatch"

I am a newbie and I do not see where to set permissions and what permissions are missing.

Johnf

Azure Blob Storage
Azure Blob Storage

An Azure service that stores unstructured data in the cloud as blobs.


2 answers

Sort by: Most helpful
  1. kagiyama yutaka 5,410 Reputation points
    2026-07-31T00:00:59.2933333+00:00

    I think this error happens when the auth you’re using (SAS or AAD) was created for a different resource type. AzCopy only works when the SAS is blob‑scoped, or when you’re using AAD with the blob endpoint and ur identity has the Storage Blob Data Contributor role on the storage account.

    Was this answer helpful?

    1 person found this answer helpful.

  2. AI answer

    2026-07-30T18:23:46.3166667+00:00

    AuthorizationResourceTypeMismatch is typically an authorization problem. With AzCopy, the most common causes are:

    1. The signed-in identity does not have the correct data access role azcopy login only signs in. It does not grant blob data permissions. For blob upload or download, assign one of these roles to the user, service principal, or managed identity used by AzCopy:
      • Storage Blob Data Reader for read operations
      • Storage Blob Data Contributor for write operations
      • Storage Blob Data Owner for management operations
      In Azure portal:
      1. Open Storage accounts.
      2. Select the target storage account.
      3. Open Access control (IAM).
      4. Select Add > Add role assignment.
      5. Assign Storage Blob Data Contributor if the goal is to copy files into blob storage.
      6. Wait a few minutes for role assignment to propagate, then try AzCopy again.
    2. If using a SAS token, the SAS does not include the right permissions Verify:
      • the SAS start and expiry times are valid
      • all required permissions were selected
      • the SAS was generated by an official SDK or tool
      Some operations need multiple permissions.
    3. Storage firewall or network rules are blocking the request A 403 authorization-style failure can also happen when the storage account firewall blocks access. Check the storage account networking settings and confirm that the machine, VM, or container running AzCopy can reach the storage account. If copying from an on-premises machine, the public IP of that machine might need to be allowed in the storage account firewall.
    4. ACLs can also block access for Data Lake Storage Gen2 scenarios If the account uses ACLs, the identity must appear in ACL entries for each file or directory being accessed, with the required permission level.
    5. If azcopy login works but interactive sign-in is restricted by Conditional Access If sign-in issues appear later or on some devices, AzCopy device code flow can be affected by Conditional Access. In that case, alternatives include:
      • using Storage Explorer
      • using a managed identity
      • using a service principal

    A practical first path for a new user is:

    1. Confirm the command is targeting Blob storage.
    2. In Storage account > Access control (IAM), assign Storage Blob Data Contributor to the identity used by azcopy login.
    3. Wait a few minutes.
    4. Retry the copy.
    5. If it still fails, check whether a SAS token is being used instead of Entra ID.
    6. Then check Networking on the storage account for firewall restrictions.

    References:

    AI-generated content may be incorrect. Read our transparency notes for more information.

    Was this answer helpful?

    1 person found this answer helpful.

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.