UsersOperations Class

UsersOperations operations.

Inheritance
builtins.object
UsersOperations

Constructor

UsersOperations(client, config, serializer, deserializer)

Parameters

Name Description
client
Required

Client for service requests.

config
Required

Configuration of service client.

serializer
Required

An object model serializer.

deserializer
Required

An object model deserializer.

Variables

Name Description
api_version

Client API version. Constant value: "1.6".

Methods

create

Create a new user.

delete

Delete a user.

get

Gets user information from the directory.

get_member_groups

Gets a collection that contains the object IDs of the groups of which the user is a member.

list

Gets list of users for the current tenant.

update

Updates a user.

create

Create a new user.

create(parameters, custom_headers=None, raw=False, **operation_config)

Parameters

Name Description
parameters
Required

Parameters to create a user.

custom_headers

headers that will be added to the request

default value: None
raw

returns the direct response alongside the deserialized response

default value: False
operation_config
Required

Operation configuration overrides.

Returns

Type Description
User,
<xref:msrest.pipeline.ClientRawResponse>

User or ClientRawResponse if raw=true

Exceptions

Type Description

delete

Delete a user.

delete(upn_or_object_id, custom_headers=None, raw=False, **operation_config)

Parameters

Name Description
upn_or_object_id
Required
str

The object ID or principal name of the user to delete.

custom_headers

headers that will be added to the request

default value: None
raw

returns the direct response alongside the deserialized response

default value: False
operation_config
Required

Operation configuration overrides.

Returns

Type Description
None,
<xref:msrest.pipeline.ClientRawResponse>

None or ClientRawResponse if raw=true

Exceptions

Type Description

get

Gets user information from the directory.

get(upn_or_object_id, custom_headers=None, raw=False, **operation_config)

Parameters

Name Description
upn_or_object_id
Required
str

The object ID or principal name of the user for which to get information.

custom_headers

headers that will be added to the request

default value: None
raw

returns the direct response alongside the deserialized response

default value: False
operation_config
Required

Operation configuration overrides.

Returns

Type Description
User,
<xref:msrest.pipeline.ClientRawResponse>

User or ClientRawResponse if raw=true

Exceptions

Type Description

get_member_groups

Gets a collection that contains the object IDs of the groups of which the user is a member.

get_member_groups(object_id, security_enabled_only, additional_properties=None, custom_headers=None, raw=False, **operation_config)

Parameters

Name Description
object_id
Required
str

The object ID of the user for which to get group membership.

security_enabled_only
Required

If true, only membership in security-enabled groups should be checked. Otherwise, membership in all groups should be checked.

additional_properties

Unmatched properties from the message are deserialized this collection

default value: None
custom_headers

headers that will be added to the request

default value: None
raw

returns the direct response alongside the deserialized response

default value: False
operation_config
Required

Operation configuration overrides.

Returns

Type Description

An iterator like instance of str

Exceptions

Type Description

list

Gets list of users for the current tenant.

list(filter=None, custom_headers=None, raw=False, **operation_config)

Parameters

Name Description
filter
str

The filter to apply to the operation.

default value: None
custom_headers

headers that will be added to the request

default value: None
raw

returns the direct response alongside the deserialized response

default value: False
operation_config
Required

Operation configuration overrides.

Returns

Type Description

An iterator like instance of User

Exceptions

Type Description

update

Updates a user.

update(upn_or_object_id, parameters, custom_headers=None, raw=False, **operation_config)

Parameters

Name Description
upn_or_object_id
Required
str

The object ID or principal name of the user to update.

parameters
Required

Parameters to update an existing user.

custom_headers

headers that will be added to the request

default value: None
raw

returns the direct response alongside the deserialized response

default value: False
operation_config
Required

Operation configuration overrides.

Returns

Type Description
None,
<xref:msrest.pipeline.ClientRawResponse>

None or ClientRawResponse if raw=true

Exceptions

Type Description

Attributes

models

models = <module 'azure.graphrbac.models' from 'C:\\hostedtoolcache\\windows\\Python\\3.11.9\\x64\\Lib\\site-packages\\azure\\graphrbac\\models\\__init__.py'>