ServicePrincipalsOperations Class

ServicePrincipalsOperations operations.

Inheritance
builtins.object
ServicePrincipalsOperations

Constructor

ServicePrincipalsOperations(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

Creates a service principal in the directory.

delete

Deletes a service principal from the directory.

get

Gets service principal information from the directory. Query by objectId or pass a filter to query by appId.

list

Gets a list of service principals from the current tenant.

list_key_credentials

Get the keyCredentials associated with the specified service principal.

list_owners

Directory objects that are owners of this service principal.

The owners are a set of non-admin users who are allowed to modify this object.

list_password_credentials

Gets the passwordCredentials associated with a service principal.

update

Updates a service principal in the directory.

update_key_credentials

Update the keyCredentials associated with a service principal.

update_password_credentials

Updates the passwordCredentials associated with a service principal.

create

Creates a service principal in the directory.

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

Parameters

parameters
ServicePrincipalCreateParameters
Required

Parameters to create a service principal.

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

ServicePrincipal or ClientRawResponse if raw=true

Return type

Exceptions

delete

Deletes a service principal from the directory.

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

Parameters

object_id
str
Required

The object ID of the service principal 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 service principal information from the directory. Query by objectId or pass a filter to query by appId.

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

Parameters

object_id
str
Required

The object ID of the service principal to get.

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

ServicePrincipal or ClientRawResponse if raw=true

Return type

Exceptions

list

Gets a list of service principals from 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 ServicePrincipal

Return type

Exceptions

list_key_credentials

Get the keyCredentials associated with the specified service principal.

list_key_credentials(object_id, custom_headers=None, raw=False, **operation_config)

Parameters

object_id
str
Required

The object ID of the service principal for which to get keyCredentials.

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 KeyCredential

Return type

Exceptions

list_owners

Directory objects that are owners of this service principal.

The owners are a set of non-admin users who are allowed to modify this object.

list_owners(object_id, custom_headers=None, raw=False, **operation_config)

Parameters

object_id
str
Required

The object ID of the service principal for which to get owners.

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 DirectoryObject

Return type

Exceptions

list_password_credentials

Gets the passwordCredentials associated with a service principal.

list_password_credentials(object_id, custom_headers=None, raw=False, **operation_config)

Parameters

object_id
str
Required

The object ID of the service principal.

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 PasswordCredential

Return type

Exceptions

update

Updates a service principal in the directory.

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

Parameters

object_id
str
Required

The object ID of the service principal to delete.

parameters
ServicePrincipalUpdateParameters
Required

Parameters to update a service principal.

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

update_key_credentials

Update the keyCredentials associated with a service principal.

update_key_credentials(object_id, value, custom_headers=None, raw=False, **operation_config)

Parameters

object_id
str
Required

The object ID for which to get service principal information.

value
list[KeyCredential]
Required

A collection of KeyCredentials.

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

update_password_credentials

Updates the passwordCredentials associated with a service principal.

update_password_credentials(object_id, value, custom_headers=None, raw=False, **operation_config)

Parameters

object_id
str
Required

The object ID of the service principal.

value
list[PasswordCredential]
Required

A collection of PasswordCredentials.

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'>