Skip to main content

users

Creates, updates, deletes, gets or lists a users resource.

Overview

Nameusers
TypeResource
Idazure.api_management.users

Fields

The following fields are returned by SELECT queries:

Gets the specified user entity.

NameDatatypeDescription
propertiesobjectUser entity contract properties.

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
getselectresourceGroupName, serviceName, userId, subscriptionIdGets the details of the user specified by its identifier.
list_by_serviceselectresourceGroupName, serviceName, subscriptionId$filter, $top, $skip, expandGroupsLists a collection of registered users in the specified service instance.
create_or_updateinsertresourceGroupName, serviceName, userId, subscriptionIdnotify, If-MatchCreates or Updates a user.
updateupdateresourceGroupName, serviceName, userId, If-Match, subscriptionIdUpdates the details of the user specified by its identifier.
deletedeleteresourceGroupName, serviceName, userId, If-Match, subscriptionIddeleteSubscriptions, notify, appTypeDeletes specific user.
generate_sso_urlexecresourceGroupName, serviceName, userId, subscriptionIdRetrieves a redirection URL containing an authentication token for signing a given user into the developer portal.

Parameters

Parameters can be passed in the WHERE clause of a query. Check the Methods section to see which parameters are required or optional for each operation.

NameDatatypeDescription
If-MatchstringETag of the Entity. ETag should match the current entity state from the header response of the GET request or it should be * for unconditional update.
resourceGroupNamestringThe name of the resource group. The name is case insensitive.
serviceNamestringThe name of the API Management service.
subscriptionIdstringThe ID of the target subscription.
userIdstringUser identifier. Must be unique in the current API Management service instance.
$filterstring| Field | Usage | Supported operators | Supported functions |</br>|-------------|-------------|-------------|-------------|</br>| name | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| firstName | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| lastName | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| email | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| state | filter | eq | |</br>| registrationDate | filter | ge, le, eq, ne, gt, lt | |</br>| note | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| groups | expand | | |</br>
$skipinteger (int32)Number of records to skip.
$topinteger (int32)Number of records to return.
If-MatchstringETag of the Entity. Not required when creating an entity, but required when updating an entity.
appTypestringDetermines the type of application which send the create user request. Default is legacy publisher portal.
deleteSubscriptionsbooleanWhether to delete user's subscription or not.
expandGroupsbooleanDetailed Group in response.
notifybooleanSend an Account Closed Email notification to the User.

SELECT examples

Gets the details of the user specified by its identifier.

SELECT
properties
FROM azure.api_management.users
WHERE resourceGroupName = '{{ resourceGroupName }}' -- required
AND serviceName = '{{ serviceName }}' -- required
AND userId = '{{ userId }}' -- required
AND subscriptionId = '{{ subscriptionId }}' -- required
;

INSERT examples

Creates or Updates a user.

INSERT INTO azure.api_management.users (
data__properties,
resourceGroupName,
serviceName,
userId,
subscriptionId,
notify,
If-Match
)
SELECT
'{{ properties }}',
'{{ resourceGroupName }}',
'{{ serviceName }}',
'{{ userId }}',
'{{ subscriptionId }}',
'{{ notify }}',
'{{ If-Match }}'
RETURNING
properties
;

UPDATE examples

Updates the details of the user specified by its identifier.

UPDATE azure.api_management.users
SET
data__properties = '{{ properties }}'
WHERE
resourceGroupName = '{{ resourceGroupName }}' --required
AND serviceName = '{{ serviceName }}' --required
AND userId = '{{ userId }}' --required
AND If-Match = '{{ If-Match }}' --required
AND subscriptionId = '{{ subscriptionId }}' --required
RETURNING
properties;

DELETE examples

Deletes specific user.

DELETE FROM azure.api_management.users
WHERE resourceGroupName = '{{ resourceGroupName }}' --required
AND serviceName = '{{ serviceName }}' --required
AND userId = '{{ userId }}' --required
AND If-Match = '{{ If-Match }}' --required
AND subscriptionId = '{{ subscriptionId }}' --required
AND deleteSubscriptions = '{{ deleteSubscriptions }}'
AND notify = '{{ notify }}'
AND appType = '{{ appType }}'
;

Lifecycle Methods

Retrieves a redirection URL containing an authentication token for signing a given user into the developer portal.

EXEC azure.api_management.users.generate_sso_url 
@resourceGroupName='{{ resourceGroupName }}' --required,
@serviceName='{{ serviceName }}' --required,
@userId='{{ userId }}' --required,
@subscriptionId='{{ subscriptionId }}' --required
;