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
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.
The scope the managed identity has access to.
Global Parameters
Increase logging verbosity to show all debug logs.
Show this help message and exit.
Only show errors, suppressing warnings.
Output format.
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.
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
Space-separated identities to assign. Use '[system]' to refer to the system assigned identity. Default: '[system]'.
Do not prompt for confirmation.
Global Parameters
Increase logging verbosity to show all debug logs.
Show this help message and exit.
Only show errors, suppressing warnings.
Output format.
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.
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.
Show this help message and exit.
Only show errors, suppressing warnings.
Output format.
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.