az ams account sp

Manage service principal and role based access for an Azure Media Services account.

Commands

az ams account sp create

Create or update a service principal and configure its access to an Azure Media Services account.

az ams account sp reset-credentials

Generate a new client secret for a service principal configured for an Azure Media Services account.

az ams account sp create

Create or update a service principal and configure its access to an Azure Media Services account.

Service principal propagation throughout Azure Active Directory may take some extra seconds to complete.

az ams account sp create --account-name
                         --resource-group
                         [--name]
                         [--new-sp-name]
                         [--password]
                         [--role]
                         [--xml]
                         [--years]

Examples

Create a service principal with password and configure its access to an Azure Media Services account. Output will be in xml format.

az ams account sp create -a myAmsAccount -g myRG -n mySpName --password mySecret --role Owner --xml

Update a service principal with a new role and new name.

az ams account sp create -a myAmsAccount -g myRG -n mySpName --new-sp-name myNewSpName --role newRole

Required Parameters

--account-name -a

The name of the Azure Media Services account.

--resource-group -g

Name of resource group. You can configure the default group using az configure --defaults group=<name>.

Optional Parameters

--name -n

The app name or app URI to associate the RBAC with. If not present, a default name like '{amsaccountname}-access-sp' will be generated.

--new-sp-name

The new app name or app URI to update the RBAC with.

--password -p

The password used to log in. Also known as 'Client Secret'. If not present, a random secret will be generated.

--role

The role of the service principal.

default value: Contributor
--xml

Enables xml output format.

--years

Number of years for which the secret will be valid. Default: 1 year.

az ams account sp reset-credentials

Generate a new client secret for a service principal configured for an Azure Media Services account.

az ams account sp reset-credentials [--account-name]
                                    [--ids]
                                    [--name]
                                    [--password]
                                    [--resource-group]
                                    [--role]
                                    [--xml]
                                    [--years]

Optional Parameters

--account-name -a

The name of the Azure Media Services account.

--ids

One or more resource IDs (space-delimited). It should be a complete resource ID containing all information of 'Resource Id' arguments. You should provide either --ids or other 'Resource Id' arguments.

--name -n

The app name or app URI to associate the RBAC with. If not present, a default name like '{amsaccountname}-access-sp' will be generated.

--password -p

The password used to log in. Also known as 'Client Secret'. If not present, a random secret will be generated.

--resource-group -g

Name of resource group. You can configure the default group using az configure --defaults group=<name>.

--role

The role of the service principal.

default value: Contributor
--xml

Enables xml output format.

--years

Number of years for which the secret will be valid. Default: 1 year.