Search code examples
c#azureazure-media-services

Azure Media Services Resource under resource group was not found


I trying this article about azure media services, but I got this error

az ams account sp create --account-name amsaccount --resource-group amsgroup

Error from the console

PS C:\Users\Herman> az ams account sp create -a amsaccount -g amsgroup -n ams --password amssecret --role Owner Command group 'ams' is in preview. It may be changed/removed in a future release. (ResourceNotFound) The Resource 'Microsoft.Media/mediaservices/amsaccount' under resource group 'amsgroup' was not found.


Solution

  • The command you are running is to create a service principal to access an existing AMS account. But it looks like you don't have an AMS account in your subscription in the resource group amsgroup with account name amsaccount. Did you already create that AMS account by following the instructions in https://learn.microsoft.com/en-us/azure/media-services/latest/create-account-cli-how-to?

    You could also run this command to list all of the AMS accounts you have created in your subscription:

    az ams account list