az iot central user

Manage and configure IoT Central users.

Commands

az iot central user create

Add a user to the application.

az iot central user delete

Delete a user from the application.

az iot central user list

Get list of users in an application.

az iot central user show

Get the details of a user by ID.

az iot central user create

Add a user to the application.

az iot central user create --app-id
                           --assignee
                           --role {admin, builder, operator}
                           [--central-api-uri]
                           [--email]
                           [--object-id]
                           [--tenant-id]
                           [--token]

Examples

Add a user by email to the application

az iot central user create --user-id {userId} --app-id {appId} --email {emailAddress} --role admin

Add a service-principal to the application

az iot central user create --user-id {userId} --app-id {appId} --tenant-id {tenantId} --object-id {objectId} --role operator

Required Parameters

--app-id -n

Target App.

--assignee --user-id

ID associated with the user.

--role -r

Role for the user/service-principal you are adding to the app.

accepted values: admin, builder, operator

Optional Parameters

--central-api-uri --central-dns-suffix

Central dns suffix. This enables running cli commands against non public/prod environments.

default value: azureiotcentral.com
--email

Email address of user to be added to the app.

--object-id --oid

Object ID for service principal to be added to the app. Tenant ID must also be specified.

--tenant-id --tnid

Tenant ID for service principal to be added to the app. Object ID must also be specified.

--token

Authorization token for request. More info available here: https://docs.microsoft.com/en-us/learn/modules/manage-iot-central-apps-with-rest-api/ MUST INCLUDE type (e.g. 'SharedAccessToken ...', 'Bearer ...'). Example: 'Bearer someBearerTokenHere'.

az iot central user delete

Delete a user from the application.

az iot central user delete --app-id
                           --assignee
                           [--central-api-uri]
                           [--token]

Examples

Delete a user

az iot central user delete --app-id {appid} --user-id {userId}

Required Parameters

--app-id -n

Target App.

--assignee --user-id

ID associated with the user.

Optional Parameters

--central-api-uri --central-dns-suffix

Central dns suffix. This enables running cli commands against non public/prod environments.

default value: azureiotcentral.com
--token

Authorization token for request. More info available here: https://docs.microsoft.com/en-us/learn/modules/manage-iot-central-apps-with-rest-api/ MUST INCLUDE type (e.g. 'SharedAccessToken ...', 'Bearer ...'). Example: 'Bearer someBearerTokenHere'.

az iot central user list

Get list of users in an application.

az iot central user list --app-id
                         [--central-api-uri]
                         [--token]

Examples

List of users

az iot central user list --app-id {appid}

Required Parameters

--app-id -n

Target App.

Optional Parameters

--central-api-uri --central-dns-suffix

Central dns suffix. This enables running cli commands against non public/prod environments.

default value: azureiotcentral.com
--token

Authorization token for request. More info available here: https://docs.microsoft.com/en-us/learn/modules/manage-iot-central-apps-with-rest-api/ MUST INCLUDE type (e.g. 'SharedAccessToken ...', 'Bearer ...'). Example: 'Bearer someBearerTokenHere'.

az iot central user show

Get the details of a user by ID.

az iot central user show --app-id
                         --assignee
                         [--central-api-uri]
                         [--token]

Examples

Get details of user

az iot central user show --app-id {appid} --user-id {userId}

Required Parameters

--app-id -n

Target App.

--assignee --user-id

ID associated with the user.

Optional Parameters

--central-api-uri --central-dns-suffix

Central dns suffix. This enables running cli commands against non public/prod environments.

default value: azureiotcentral.com
--token

Authorization token for request. More info available here: https://docs.microsoft.com/en-us/learn/modules/manage-iot-central-apps-with-rest-api/ MUST INCLUDE type (e.g. 'SharedAccessToken ...', 'Bearer ...'). Example: 'Bearer someBearerTokenHere'.