UsersOperations Class

UsersOperations operations.

Inheritance
builtins.object
UsersOperations

Constructor

UsersOperations(client, config, serializer, deserializer)

Parameters

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

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

parameters
UserCreateParameters
Required

Parameters to create a user.

custom_headers
dict
default value: None

headers that will be added to the request

raw
bool
default value: False

returns the direct response alongside the deserialized response

operation_config
Required

Operation configuration overrides.

Returns

User or ClientRawResponse if raw=true

Return type

User,

Exceptions

delete

Delete a user.

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

Parameters

upn_or_object_id
str
Required

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

custom_headers
dict
default value: None

headers that will be added to the request

raw
bool
default value: False

returns the direct response alongside the deserialized response

operation_config
Required

Operation configuration overrides.

Returns

None or ClientRawResponse if raw=true

Return type

None,

Exceptions

get

Gets user information from the directory.

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

Parameters

upn_or_object_id
str
Required

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

custom_headers
dict
default value: None

headers that will be added to the request

raw
bool
default value: False

returns the direct response alongside the deserialized response

operation_config
Required

Operation configuration overrides.

Returns

User or ClientRawResponse if raw=true

Return type

User,

Exceptions

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

object_id
str
Required

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

security_enabled_only
bool
Required

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

additional_properties
dict[str, object]
default value: None

Unmatched properties from the message are deserialized this collection

custom_headers
dict
default value: None

headers that will be added to the request

raw
bool
default value: False

returns the direct response alongside the deserialized response

operation_config
Required

Operation configuration overrides.

Returns

An iterator like instance of str

Return type

Exceptions

list

Gets list of users for the current tenant.

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

Parameters

filter
str
default value: None

The filter to apply to the operation.

custom_headers
dict
default value: None

headers that will be added to the request

raw
bool
default value: False

returns the direct response alongside the deserialized response

operation_config
Required

Operation configuration overrides.

Returns

An iterator like instance of User

Return type

Exceptions

update

Updates a user.

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

Parameters

upn_or_object_id
str
Required

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

parameters
UserUpdateParameters
Required

Parameters to update an existing user.

custom_headers
dict
default value: None

headers that will be added to the request

raw
bool
default value: False

returns the direct response alongside the deserialized response

operation_config
Required

Operation configuration overrides.

Returns

None or ClientRawResponse if raw=true

Return type

None,

Exceptions

Attributes

models

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