az staticwebapp identity
Manage a static web app's managed identity.
Commands
Name | Description | Type | Status |
---|---|---|---|
az staticwebapp identity assign |
Assign managed identity to the static web app. |
Core | GA |
az staticwebapp identity remove |
Disable static web app's managed identity. |
Core | GA |
az staticwebapp identity show |
Display static web app's managed identity. |
Core | GA |
az staticwebapp identity assign
Assign managed identity to the static web app.
az staticwebapp identity assign --name
--resource-group
[--identities]
[--role]
[--scope]
Examples
assign local identity and assign a reader role to the current resource group.
az staticwebapp identity assign -g MyResourceGroup -n MyUniqueApp --role reader --scope /subscriptions/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/resourcegroups/MyResourceGroup
enable identity for the web app.
az staticwebapp identity assign -g MyResourceGroup -n MyUniqueApp
assign local identity and a user assigned identity to a static web app.
az staticwebapp identity assign -g MyResourceGroup -n MyUniqueApp --identities [system] myAssignedId
Required Parameters
Name of the static site.
Name of resource group. You can configure the default group using az configure --defaults group=<name>
.
Optional Parameters
The following parameters are optional, but depending on the context, one or more might become required for the command to execute successfully.
Space-separated identities to assign. Use '[system]' to refer to the system assigned identity. Default: '[system]'.
Role name or id the managed identity will be assigned.
Property | Value |
---|---|
Default value: | Contributor |
The scope the managed identity has access to.
Global Parameters
Increase logging verbosity to show all debug logs.
Property | Value |
---|---|
Default value: | False |
Show this help message and exit.
Only show errors, suppressing warnings.
Property | Value |
---|---|
Default value: | False |
Output format.
Property | Value |
---|---|
Default value: | json |
Accepted values: | json, jsonc, none, table, tsv, yaml, yamlc |
JMESPath query string. See http://jmespath.org/ for more information and examples.
Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID
.
Increase logging verbosity. Use --debug for full debug logs.
Property | Value |
---|---|
Default value: | False |
az staticwebapp identity remove
Disable static web app's managed identity.
az staticwebapp identity remove --name
--resource-group
[--identities]
[--yes]
Examples
Disable static web app's system managed identity
az staticwebapp identity remove --name MyApp --resource-group MyResourceGroup
Disable static web app's system managed identity and a user managed identity
az staticwebapp identity remove --name MyApp --resource-group MyResourceGroup --identities [system] myAssignedId
Required Parameters
Name of the static site.
Name of resource group. You can configure the default group using az configure --defaults group=<name>
.
Optional Parameters
The following parameters are optional, but depending on the context, one or more might become required for the command to execute successfully.
Space-separated identities to assign. Use '[system]' to refer to the system assigned identity. Default: '[system]'.
Do not prompt for confirmation.
Property | Value |
---|---|
Default value: | False |
Global Parameters
Increase logging verbosity to show all debug logs.
Property | Value |
---|---|
Default value: | False |
Show this help message and exit.
Only show errors, suppressing warnings.
Property | Value |
---|---|
Default value: | False |
Output format.
Property | Value |
---|---|
Default value: | json |
Accepted values: | json, jsonc, none, table, tsv, yaml, yamlc |
JMESPath query string. See http://jmespath.org/ for more information and examples.
Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID
.
Increase logging verbosity. Use --debug for full debug logs.
Property | Value |
---|---|
Default value: | False |
az staticwebapp identity show
Display static web app's managed identity.
az staticwebapp identity show --name
--resource-group
Examples
display static web app's managed identity (autogenerated)
az staticwebapp identity show --name MyApp --resource-group MyResourceGroup
Required Parameters
Name of the static site.
Name of resource group. You can configure the default group using az configure --defaults group=<name>
.
Global Parameters
Increase logging verbosity to show all debug logs.
Property | Value |
---|---|
Default value: | False |
Show this help message and exit.
Only show errors, suppressing warnings.
Property | Value |
---|---|
Default value: | False |
Output format.
Property | Value |
---|---|
Default value: | json |
Accepted values: | json, jsonc, none, table, tsv, yaml, yamlc |
JMESPath query string. See http://jmespath.org/ for more information and examples.
Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID
.
Increase logging verbosity. Use --debug for full debug logs.
Property | Value |
---|---|
Default value: | False |