Hi @Bernadine Lao
The error you are facing "AuthorizationPermissionMismatch" indicates that the managed identity (MSI) being used does not have the necessary permissions to access the Azure storage account, despite the federated identity in the application having the required roles. To resolve this issue without granting permissions directly to the managed identity itself, you may consider the following approaches:
- Proper Role Assignment: Verify that the federated identity (which is associated with the application) has the necessary roles assigned at the storage account level. This includes roles like "Storage Table Data Contributor," "Storage Queue Data Contributor," and "Storage Blob Data Contributor."
- Use Service Principal: If the application is using a service principal that has the required roles, ensure that the requests are being made under the context of that service principal instead of the managed identity. This may involve adjusting the authentication mechanism in your application to utilize the service principal directly.
- Check Access Policies: Review any access policies that may be in place for the storage account. Sometimes, specific access policies can restrict the permissions even if the roles are correctly assigned.
Please Refer to Azure documentation for role-based access control (RBAC) to ensure that all necessary configurations are correctly set up.
What is Azure role-based access control (Azure RBAC)? | Microsoft Learn
If you have implemented these steps and the issue persists, it may be necessary to consider granting permissions to the managed identity as a final option. This approach ensures that you exhaust all other possibilities before resorting to directly assigning permissions to the managed identity.
Data virtualization - Azure SQL Managed Instance | Microsoft Learn
Hope the above answer helps! Please let us know do you have any further queries.
Please do consider to “up-vote” wherever the information provided helps you, this can be beneficial to other community members.