Could you help with the container's assessing error ?

minh tran 211 Reputation points
2024-06-01T07:06:30.8+00:00

Hello,

  I tried to create three containers in my Storage Account. It went went and the containers were created.

But there was a problem when I tried to access the container. It said that "This request is not authorized to perform this operation using this permission". I don't undertand the error message and I don't know how to fix it. Could you please help?

All three container were created successfully

Screenshot 2024-06-01 030257

But there was a problem when I tried to access a container. There was an error message saying that "This request is not authorized to perform this operation using this permission."

Screenshot 2024-06-01 030521

 

Attached is my Power Shell script for creating the three containers.

 

$MultipleContainers = @(
    'containera'
    'containerb'
    'containerc'  
)
 #$MultipleContainers |   ForEach-Object {$_.Name}
 foreach ($ContainerName in $MultipleContainers){
   
    if (Get-AzStorageContainer -name $ContainerName -Context $StorageAccount.Context){
        'AZStorageContainer already exist'
        $StorageContainer = Get-AzStorageContainer -name $ContainerName -Context $StorageAccount.Context
    }
    else {
        'Creating Storage Container'
        $StorageContainer = New-AzStorageContainer -name $ContainerName -Context $StorageAccount.Context `
        -Permission Blob
    }
 }
 

 

 

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.
3,149 questions
0 comments No comments
{count} votes

Accepted answer
  1. Nehruji R 7,801 Reputation points Microsoft Vendor
    2024-06-03T11:07:34.45+00:00

    Hello minh tran,

    Greetings! Welcome to Microsoft Q&A Platform.

    The error message “This request is not authorized to perform this operation using this permission” typically occurs when there are permission issues related to accessing Azure Blob Storage. Please consider checking the following to resolve the issue.

    Ensure that the service principal you’re using has the necessary permissions. Specifically, it should have the “Storage Blob Data Contributor” role assigned. You can do this through the Azure Portal by going to your Storage Account, then navigating to Access Control (IAM) and adding the role assignment for the service principal.refer - https://video2.skills-academy.com/en-us/azure/storage/blobs/data-lake-storage-access-control#levels-of-permission

    Check if your storage account has firewall rules configured. If it does, ensure that the outbound IP address of yours is whitelisted in the storage account firewall settings. Alternatively, consider creating a virtual network in Azure and adding it to the storage account’s firewall settings.

    I would recommend you try selecting configuration via All Networks and test the same. If that works, there is a blocker on the networking level.

    Also verify on your storage account have you enabled the "Hierarchical namespace" feature? You can see this in the Configuration blade of the Storage account and try using the v2.0 token endpoint to generate an access token. This can sometimes resolve authorization issues.

    refer similar thread- https://stackoverflow.com/questions/54962726/this-request-is-not-authorized-to-perform-this-operation-using-this-permission, https://stackoverflow.com/questions/65604223/azure-permission-not-authorized-to-perform-this-operation, https://video2.skills-academy.com/en-us/answers/questions/276987/cannot-access-container-in-a-storage-account

    Hope this answer helps! Please let us know if you have any further queries. I’m happy to assist you further.


    Please "Accept the answer” and “up-vote” wherever the information provided helps you, this can be beneficial to other community members.


0 additional answers

Sort by: Most helpful

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.