Hello Kamil Zak,
Greetings! Welcome to Microsoft Q&A Platform.
I understand that you are getting AuthorizationPermissionMismatch error when attempting to access a blob file in Azure Blob Storage which might be due to insufficient permissions and below are some troubleshooting steps to overcome this error,
- Make sure the user or application has the necessary permissions/access to the blob storage assigned: Assign an Azure role for access to blob data and listed under service principal of IAM Access.
- Check the access policies for the blob container and confirm that your IP address is added to the CORS (Cross-Origin Resource Sharing) settings on the blob storage. This ensures that your requests are allowed from the specified IP.
- When a user is part of a group, Azure evaluates permissions based on both direct and inherited roles. Ensure that the group itself has the necessary permissions on the blob storage and check if there are conflicting roles assigned directly to the user or application. Sometimes, a direct role assignment can override an inherited role from a group.
- Use the Effective Permissions tool in the Azure portal to see the combined permissions for a user or application. It considers both direct and inherited roles.
- Make sure you’ve properly configured your BlobServiceClient and that the container and blob names are correct.
- Try using "Diagnose and solve problems" tool in the Azure portal sidebar for your storage account. It will help you look through your logs to see what's going on.
Similar SO thread for reference - https://stackoverflow.com/questions/52769758/azure-blob-storage-authorization-permission-mismatch-error-for-get-request-wit
Hope this answer helps! Please let us know if you have any further queries. I’m happy to assist you further.
Please do not forget to "Accept the answer” and “up-vote” wherever the information provided helps you, this can be beneficial to other community members.