az staticwebapp users

Manage users of the static app.

Commands

az staticwebapp users invite

Create invitation link for specified user to the static app.

az staticwebapp users list

Lists users and assigned roles, limited to users who accepted their invites.

az staticwebapp users update

Updates a user entry with the listed roles. Either user details or user id is required.

az staticwebapp users invite

Create invitation link for specified user to the static app.

az staticwebapp users invite --authentication-provider
                             --domain
                             --invitation-expiration-in-hours
                             --name
                             --roles
                             --user-details
                             [--resource-group]
                             [--subscription]

Examples

Create invitation link for specified user to the static app.

az staticwebapp users invite -n MyStaticAppName --authentication-provider GitHub --user-details JohnDoe --role Contributor --domain static-app-001.azurestaticapps.net --invitation-expiration-in-hours 1

Required Parameters

--authentication-provider

Authentication provider of the user identity such as AAD, Facebook, GitHub, Google, Twitter.

--domain

A domain added to the static app in quotes.

--invitation-expiration-in-hours

This value sets when the link will expire in hours. The maximum is 168 (7 days).

--name -n

Name of the static site.

--roles

Comma-separated default or user-defined role names. Roles that can be assigned to a user are comma separated and case-insensitive (at most 50 roles up to 25 characters each and restricted to 0-9,A-Z,a-z, and _). Define roles in routes.json during root directory of your GitHub repo.

--user-details

Email for AAD, Facebook, and Google. Account name (handle) for GitHub and Twitter.

Optional Parameters

--resource-group -g

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

--subscription

Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID.

az staticwebapp users list

Lists users and assigned roles, limited to users who accepted their invites.

az staticwebapp users list --name
                           [--authentication-provider]
                           [--query-examples]
                           [--resource-group]
                           [--subscription]

Examples

Lists users and assigned roles.

az staticwebapp users list -n MyStaticAppName

Required Parameters

--name -n

Name of the static site.

Optional Parameters

--authentication-provider

Authentication provider of the user identity such as AAD, Facebook, GitHub, Google, Twitter.

default value: all
--query-examples

Recommend JMESPath string for you. You can copy one of the query and paste it after --query parameter within double quotation marks to see the results. You can add one or more positional keywords so that we can give suggestions based on these key words.

--resource-group -g

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

--subscription

Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID.

az staticwebapp users update

Updates a user entry with the listed roles. Either user details or user id is required.

az staticwebapp users update --name
                             --roles
                             [--authentication-provider]
                             [--resource-group]
                             [--subscription]
                             [--user-details]
                             [--user-id]

Examples

Updates a user entry with the listed roles.

az staticwebapp users update -n MyStaticAppName --user-details JohnDoe --role Contributor

Required Parameters

--name -n

Name of the static site.

--roles

Comma-separated default or user-defined role names. Roles that can be assigned to a user are comma separated and case-insensitive (at most 50 roles up to 25 characters each and restricted to 0-9,A-Z,a-z, and _). Define roles in routes.json during root directory of your GitHub repo.

Optional Parameters

--authentication-provider

Authentication provider of the user identity such as AAD, Facebook, GitHub, Google, Twitter.

--resource-group -g

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

--subscription

Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID.

--user-details

Email for AAD, Facebook, and Google. Account name (handle) for GitHub and Twitter.

--user-id

Given id of registered user.