I am trying to deploy Azure Language Service (Custom text classification). However I cannot create the resource that I want because the service is trying to assign roles. The reason for this is that it has access to the storage account. Obviously I do not have the permissions to do so because I work for a company. Is there some way to circumvent this? Is there a way to create the resource without needing the permission of assigning roles?
As a side note: I do have the permission to create the resource to begin with
You have 2 options to use Custom text classification on Azure Language Service:
In both cases, you will need the intervention of someone who can setup roles on resources, but the 2nd option needs less actions on their side (it's just role assignment versus resources creation for 1st option).
In the 1st case (I guess the one you did), the process needs to setup the roles as you mentioned, and you are blocked as you don't have this permission.
In the 2nd case, you could:
In Azure Portal, under "Identity" tab, turn on managed identity (whether System Assigned or User Assigned, up to you)
After clicking "On" and saving:
Create your storage in the same region as your Language Service resource:
Permissions are details here in the documentation
Your Azure blob storage account must have the below roles:
- Your resource has the owner or contributor role on the storage account.
- Your resource has the Storage blob data owner or Storage blob data contributor role on the storage account.
- Your resource has the Reader role on the storage account.
So you have to ask your "administrator" to go to the Storage account resource, "Access Control (IAM)" section, and add the roles to your previously enabled managed identity. By using the least privilege principle I would set the following roles:
Example for Storage Blob Data Contributor setup:
Go to Language Studio (https://language.cognitive.azure.com/) and choose your language service resource. Then, go to "Custom text classification".
Click "Create new project" and you will be guided to link your language service resource to your storage account:
Select the Storage account and click next.
You can check in the "Activity Log" of your Language Service resource that it linked the Storage to this resource:
It added the "userOwnedStorage" property to the properties:
Then you're good to go!