Struct azure_devops_rust_api::graph::users::Client
source · pub struct Client(/* private fields */);
Implementations§
source§impl Client
impl Client
sourcepub fn list(&self, organization: impl Into<String>) -> RequestBuilder
pub fn list(&self, organization: impl Into<String>) -> RequestBuilder
Get a list of all users in a given scope.
Since the list of users may be large, results are returned in pages of users. If there are more results than can be returned in a single page, the result set will contain a continuation token for retrieval of the next set of results.
Arguments:
organization
: The name of the Azure DevOps organization.
sourcepub fn create(
&self,
organization: impl Into<String>,
body: impl Into<GraphUserCreationContext>
) -> RequestBuilder
pub fn create( &self, organization: impl Into<String>, body: impl Into<GraphUserCreationContext> ) -> RequestBuilder
Materialize an existing AAD or MSA user into the ADO account.
NOTE: Created users are not active in an account unless they have been explicitly assigned a parent group at creation time or have signed in and been autolicensed through AAD group memberships.
Adding a user to an account is required before the user can be added to ADO groups or assigned an asset.
The body of the request must be a derived type of GraphUserCreationContext:
- GraphUserMailAddressCreationContext - Create a new user using the mail address as a reference to an existing user from an external AD or AAD backed provider.
- GraphUserOriginIdCreationContext - Create a new user using the OriginID as a reference to an existing user from an external AD or AAD backed provider.
- GraphUserPrincipalNameCreationContext - Create a new user using the principal name as a reference to an existing user from an external AD or AAD backed provider.
If the user to be added corresponds to a user that was previously deleted, then that user will be restored.
Optionally, you can add the newly created user as a member of an existing ADO group and/or specify a custom storage key for the user.
Arguments:
organization
: The name of the Azure DevOps organization.body
: The subset of the full graph user used to uniquely find the graph subject in an external provider.
sourcepub fn get(
&self,
organization: impl Into<String>,
user_descriptor: impl Into<String>
) -> RequestBuilder
pub fn get( &self, organization: impl Into<String>, user_descriptor: impl Into<String> ) -> RequestBuilder
Get a user by its descriptor.
Arguments:
organization
: The name of the Azure DevOps organization.user_descriptor
: The descriptor of the desired user.
sourcepub fn update(
&self,
organization: impl Into<String>,
body: impl Into<GraphUserUpdateContext>,
user_descriptor: impl Into<String>
) -> RequestBuilder
pub fn update( &self, organization: impl Into<String>, body: impl Into<GraphUserUpdateContext>, user_descriptor: impl Into<String> ) -> RequestBuilder
Map an existing user to a different user.
The body of the request must be a derived type of GraphUserUpdateContext:
- GraphUserOriginIdUpdateContext - Map an existing user in an account, to an existing user from an external AD or AAD backed provider using the OriginId as a reference.
Arguments:
organization
: The name of the Azure DevOps organization.body
: The subset of the full graph user used to uniquely find the graph subject in an external provider.user_descriptor
: The descriptor of the user to update
sourcepub fn delete(
&self,
organization: impl Into<String>,
user_descriptor: impl Into<String>
) -> RequestBuilder
pub fn delete( &self, organization: impl Into<String>, user_descriptor: impl Into<String> ) -> RequestBuilder
Disables a user.
The user will still be visible, but membership checks for the user will return false.
Arguments:
organization
: The name of the Azure DevOps organization.user_descriptor
: The descriptor of the user to delete.