Class UsersRequestBuilder
-
Nested Class Summary
Modifier and TypeClassDescriptionstatic class
Represents the query parameters.static class
Represents the query parameters.static class
Request configuration object for the query parameters.static class
Request configuration object for the query parameters.Nested classes/interfaces inherited from class org.azd.abstractions.BaseRequestBuilder
BaseRequestBuilder.ProjectExcludeParameter
-
Field Summary
Fields inherited from class org.azd.abstractions.BaseRequestBuilder
accessTokenCredential, apiVersion, area, locationId, organizationUrl, serializer
-
Constructor Summary
ConstructorDescriptionUsersRequestBuilder
(String organizationUrl, AccessTokenCredential accessTokenCredential) Instantiates a new RequestBuilder instance and sets the default values. -
Method Summary
Modifier and TypeMethodDescriptioncreate
(GraphUserCreationContext creationContext) Materialize an existing AAD or MSA user into the ADO account.create
(GraphUserCreationContext creationContext, Consumer<UsersRequestBuilder.RequestConfiguration> requestConfiguration) Materialize an existing AAD or MSA user into the ADO account.createAsync
(GraphUserCreationContext creationContext) Materialize an existing AAD or MSA user into the ADO account.createAsync
(GraphUserCreationContext creationContext, Consumer<UsersRequestBuilder.RequestConfiguration> requestConfiguration) Materialize an existing AAD or MSA user into the ADO account.The user will still be visible, but membership checks for the user will return false.deleteAsync
(String userDescriptor) The user will still be visible, but membership checks for the user will return false.Get a user by its descriptor.Get a user by its descriptor.list()
Get a list of all users in a given scope.list
(Consumer<UsersRequestBuilder.ListRequestConfiguration> requestConfiguration) Get a list of all users in a given scope.Get a list of all users in a given scope.listAsync
(Consumer<UsersRequestBuilder.ListRequestConfiguration> requestConfiguration) Get a list of all users in a given scope.update
(GraphUserUpdateContext updateContext, String userDescriptor) Map an existing user to a different user.updateAsync
(GraphUserUpdateContext updateContext, String userDescriptor) Map an existing user to a different user.Methods inherited from class org.azd.abstractions.BaseRequestBuilder
builder
-
Constructor Details
-
UsersRequestBuilder
Instantiates a new RequestBuilder instance and sets the default values.- Parameters:
organizationUrl
- Represents organization location request url.accessTokenCredential
- Access token credential object.
-
-
Method Details
-
createAsync
public CompletableFuture<GraphUser> createAsync(GraphUserCreationContext creationContext) throws AzDException 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.- Parameters:
creationContext
- graph user creation context object to create a user.- Returns:
- Graph user object
GraphUser
- Throws:
AzDException
- Default Api exception handler.
-
createAsync
public CompletableFuture<GraphUser> createAsync(GraphUserCreationContext creationContext, Consumer<UsersRequestBuilder.RequestConfiguration> requestConfiguration) throws AzDException 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.- Parameters:
creationContext
- graph user creation context object to create a user.requestConfiguration
- Consumer of request configuration. This represents the query parameter for the request.- Returns:
- Graph user object
GraphUser
- Throws:
AzDException
- Default Api exception handler.
-
deleteAsync
The user will still be visible, but membership checks for the user will return false.- Parameters:
userDescriptor
- The descriptor of the user to delete.- Throws:
AzDException
- Default Api exception handler.
-
getAsync
Get a user by its descriptor.- Parameters:
userDescriptor
- The descriptor of the user to delete.- Returns:
- Graph user object
GraphUser
- Throws:
AzDException
- Default Api exception handler.
-
listAsync
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.
- Returns:
- Collection of graph user as a paged response. Use getNextPageLink() to get the next page.
- Throws:
AzDException
- Default Api exception handler.
-
listAsync
public CompletableFuture<GraphUsers> listAsync(Consumer<UsersRequestBuilder.ListRequestConfiguration> requestConfiguration) throws AzDException 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.
- Parameters:
requestConfiguration
- Consumer of request configuration. This represents the query parameter for the request.- Returns:
- Collection of graph user as a paged response. Use getNextPageLink() to get the next page.
- Throws:
AzDException
- Default Api exception handler.
-
updateAsync
public CompletableFuture<GraphUser> updateAsync(GraphUserUpdateContext updateContext, String userDescriptor) throws AzDException Map an existing user to a different user.
The body of the request must be a derived type ofGraphUserUpdateContext
: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.- Parameters:
updateContext
- origin id and optionally storage key to update.userDescriptor
- The descriptor of the user to update- Returns:
- Graph user object
GraphUser
- Throws:
AzDException
- Default Api exception handler.
-
create
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.- Parameters:
creationContext
- graph user creation context object to create a user.- Returns:
- Graph user object
GraphUser
- Throws:
AzDException
- Default Api exception handler.
-
create
public GraphUser create(GraphUserCreationContext creationContext, Consumer<UsersRequestBuilder.RequestConfiguration> requestConfiguration) throws AzDException 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.- Parameters:
creationContext
- graph user creation context object to create a user.requestConfiguration
- Consumer of request configuration. This represents the query parameter for the request.- Returns:
- Graph user object
GraphUser
- Throws:
AzDException
- Default Api exception handler.
-
delete
The user will still be visible, but membership checks for the user will return false.- Parameters:
userDescriptor
- The descriptor of the user to delete.- Throws:
AzDException
- Default Api exception handler.
-
get
Get a user by its descriptor.- Parameters:
userDescriptor
- The descriptor of the user to delete.- Returns:
- Graph user object
GraphUser
- Throws:
AzDException
- Default Api exception handler.
-
list
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.
- Returns:
- Collection of graph user as a paged response. Use getNextPageLink() to get the next page.
- Throws:
AzDException
- Default Api exception handler.
-
list
public GraphUsers list(Consumer<UsersRequestBuilder.ListRequestConfiguration> requestConfiguration) throws AzDException 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.
- Parameters:
requestConfiguration
- Consumer of request configuration. This represents the query parameter for the request.- Returns:
- Collection of graph user as a paged response. Use getNextPageLink() to get the next page.
- Throws:
AzDException
- Default Api exception handler.
-
update
public GraphUser update(GraphUserUpdateContext updateContext, String userDescriptor) throws AzDException Map an existing user to a different user.
The body of the request must be a derived type ofGraphUserUpdateContext
: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.- Parameters:
updateContext
- origin id and optionally storage key to update.userDescriptor
- The descriptor of the user to update- Returns:
- Graph user object
GraphUser
- Throws:
AzDException
- Default Api exception handler.
-