API version:
Show / Hide Table of Contents

Interface IUsersClient

A client that works with Okta User resources.

Inherited Members
System.Collections.Generic.IAsyncEnumerable<Okta.Sdk.IUser>.GetAsyncEnumerator(System.Threading.CancellationToken)
Namespace: Okta.Sdk
Assembly: Okta.Sdk.dll
Syntax
public interface IUsersClient : IAsyncEnumerable<IUser>

Methods

ActivateUserAsync(String, Nullable<Boolean>, CancellationToken)

Activates a user. This operation can only be performed on users with a STAGED status. Activation of a user is an asynchronous operation. The user will have the transitioningToStatus property with a value of ACTIVE during activation to indicate that the user hasn't completed the asynchronous operation. The user will have a status of ACTIVE when the activation process is complete.

Declaration
Task<IUserActivationToken> ActivateUserAsync(string userId, bool? sendEmail, CancellationToken cancellationToken = default(CancellationToken))
Parameters
Type Name Description
System.String userId
System.Nullable<System.Boolean> sendEmail

Sends an activation email to the user if true

System.Threading.CancellationToken cancellationToken

The cancellation token.

Returns
Type Description
System.Threading.Tasks.Task<IUserActivationToken>

The IUserActivationToken response.

AddAllAppsAsTargetToRoleAsync(String, String, CancellationToken)

Success

Declaration
Task AddAllAppsAsTargetToRoleAsync(string userId, string roleId, CancellationToken cancellationToken = default(CancellationToken))
Parameters
Type Name Description
System.String userId
System.String roleId
System.Threading.CancellationToken cancellationToken

The cancellation token.

Returns
Type Description
System.Threading.Tasks.Task

A Task that represents the asynchronous operation.

AddApplicationTargetToAdminRoleForUserAsync(String, String, String, CancellationToken)

Success

Declaration
Task AddApplicationTargetToAdminRoleForUserAsync(string userId, string roleId, string appName, CancellationToken cancellationToken = default(CancellationToken))
Parameters
Type Name Description
System.String userId
System.String roleId
System.String appName
System.Threading.CancellationToken cancellationToken

The cancellation token.

Returns
Type Description
System.Threading.Tasks.Task

A Task that represents the asynchronous operation.

AddApplicationTargetToAppAdminRoleForUserAsync(String, String, String, String, CancellationToken)

Add App Instance Target to App Administrator Role given to a User

Declaration
Task AddApplicationTargetToAppAdminRoleForUserAsync(string userId, string roleId, string appName, string applicationId, CancellationToken cancellationToken = default(CancellationToken))
Parameters
Type Name Description
System.String userId
System.String roleId
System.String appName
System.String applicationId
System.Threading.CancellationToken cancellationToken

The cancellation token.

Returns
Type Description
System.Threading.Tasks.Task

A Task that represents the asynchronous operation.

AddGroupTargetToRoleAsync(String, String, String, CancellationToken)

Adds a group target for a role assigned to a user.

Declaration
Task AddGroupTargetToRoleAsync(string userId, string roleId, string groupId, CancellationToken cancellationToken = default(CancellationToken))
Parameters
Type Name Description
System.String userId
System.String roleId
System.String groupId
System.Threading.CancellationToken cancellationToken

The cancellation token.

Returns
Type Description
System.Threading.Tasks.Task

A Task that represents the asynchronous operation.

AssignRoleToUserAsync(IAssignRoleRequest, String, String, CancellationToken)

Assigns a role to a user.

Declaration
Task<IRole> AssignRoleToUserAsync(IAssignRoleRequest assignRoleRequest, string userId, string disableNotifications = null, CancellationToken cancellationToken = default(CancellationToken))
Parameters
Type Name Description
IAssignRoleRequest assignRoleRequest

The IAssignRoleRequest resource.

System.String userId
System.String disableNotifications
System.Threading.CancellationToken cancellationToken

The cancellation token.

Returns
Type Description
System.Threading.Tasks.Task<IRole>

The IRole response.

ChangePasswordAsync(IChangePasswordRequest, String, Nullable<Boolean>, CancellationToken)

Changes a user's password by validating the user's current password. This operation can only be performed on users in STAGED, ACTIVE, PASSWORD_EXPIRED, or RECOVERY status that have a valid password credential

Declaration
Task<IUserCredentials> ChangePasswordAsync(IChangePasswordRequest changePasswordRequest, string userId, bool? strict = default(bool? ), CancellationToken cancellationToken = default(CancellationToken))
Parameters
Type Name Description
IChangePasswordRequest changePasswordRequest

The IChangePasswordRequest resource.

System.String userId
System.Nullable<System.Boolean> strict
System.Threading.CancellationToken cancellationToken

The cancellation token.

Returns
Type Description
System.Threading.Tasks.Task<IUserCredentials>

The IUserCredentials response.

ChangePasswordAsync(IChangePasswordRequest, String, CancellationToken)

Changes a user's password by validating the user's current password. This operation can only be performed on users in STAGED, ACTIVE, PASSWORD_EXPIRED, or RECOVERY status that have a valid password credential

Declaration
Task<IUserCredentials> ChangePasswordAsync(IChangePasswordRequest changePasswordRequest, string userId, CancellationToken cancellationToken = default(CancellationToken))
Parameters
Type Name Description
IChangePasswordRequest changePasswordRequest

The IChangePasswordRequest resource.

System.String userId

The user ID.

System.Threading.CancellationToken cancellationToken

The cancellation token.

Returns
Type Description
System.Threading.Tasks.Task<IUserCredentials>

The IUserCredentials response.

Remarks

Explicit overload to support backward compatibility.

ChangePasswordAsync(String, ChangePasswordOptions, CancellationToken)

Changes a user's password.

Declaration
Task<IUserCredentials> ChangePasswordAsync(string userId, ChangePasswordOptions options, CancellationToken cancellationToken = default(CancellationToken))
Parameters
Type Name Description
System.String userId

The user ID.

ChangePasswordOptions options

The options for this Change Password request.

System.Threading.CancellationToken cancellationToken

The cancellation token.

Returns
Type Description
System.Threading.Tasks.Task<IUserCredentials>

The UserCredentials response.

ChangeRecoveryQuestionAsync(IUserCredentials, String, CancellationToken)

Declaration
Task<IUserCredentials> ChangeRecoveryQuestionAsync(IUserCredentials userCredentials, string userId, CancellationToken cancellationToken = default(CancellationToken))
Parameters
Type Name Description
IUserCredentials userCredentials
System.String userId
System.Threading.CancellationToken cancellationToken
Returns
Type Description
System.Threading.Tasks.Task<IUserCredentials>

ChangeRecoveryQuestionAsync(String, ChangeRecoveryQuestionOptions, CancellationToken)

Changes a user's recovery question.

Declaration
Task ChangeRecoveryQuestionAsync(string userId, ChangeRecoveryQuestionOptions options, CancellationToken cancellationToken = default(CancellationToken))
Parameters
Type Name Description
System.String userId

The user ID.

ChangeRecoveryQuestionOptions options

The options for this Change Recovery Question request.

System.Threading.CancellationToken cancellationToken

The cancellation token.

Returns
Type Description
System.Threading.Tasks.Task

The IUserCredentials response.

ClearUserSessionsAsync(String, Nullable<Boolean>, CancellationToken)

Removes all active identity provider sessions. This forces the user to authenticate on the next operation. Optionally revokes OpenID Connect and OAuth refresh and access tokens issued to the user.

Declaration
Task ClearUserSessionsAsync(string userId, bool? oauthTokens, CancellationToken cancellationToken = default(CancellationToken))
Parameters
Type Name Description
System.String userId
System.Nullable<System.Boolean> oauthTokens

Revoke issued OpenID Connect and OAuth refresh and access tokens

System.Threading.CancellationToken cancellationToken

The cancellation token.

Returns
Type Description
System.Threading.Tasks.Task

A Task that represents the asynchronous operation.

CreateUserAsync(CreateUserWithImportedHashedPasswordOptions, CancellationToken)

Creates a new user in your Okta organization with the specified hashed password.

Declaration
Task<IUser> CreateUserAsync(CreateUserWithImportedHashedPasswordOptions options, CancellationToken cancellationToken = default(CancellationToken))
Parameters
Type Name Description
CreateUserWithImportedHashedPasswordOptions options

The options for this Create User (with a specified hashed password) request.

System.Threading.CancellationToken cancellationToken

The cancellation token.

Returns
Type Description
System.Threading.Tasks.Task<IUser>

The created user.

Remarks

See Create User with Imported Hashed Password in the documentation.

CreateUserAsync(CreateUserWithoutCredentialsOptions, CancellationToken)

Creates a new user in your Okta organization without a password or a recovery question/answer.

Declaration
Task<IUser> CreateUserAsync(CreateUserWithoutCredentialsOptions options, CancellationToken cancellationToken = default(CancellationToken))
Parameters
Type Name Description
CreateUserWithoutCredentialsOptions options

The options for this Create User (without credentials) request.

System.Threading.CancellationToken cancellationToken

The cancellation token.

Returns
Type Description
System.Threading.Tasks.Task<IUser>

The created user.

Remarks

See Create User without Credentials in the documentation.

CreateUserAsync(CreateUserWithPasswordImportInlineHookOptions, CancellationToken)

Creates a new user in your Okta organization specifying that a Password Inline Hook should be used to handle password verification..

Declaration
Task<IUser> CreateUserAsync(CreateUserWithPasswordImportInlineHookOptions options, CancellationToken cancellationToken = default(CancellationToken))
Parameters
Type Name Description
CreateUserWithPasswordImportInlineHookOptions options

The options for this Create User (with password import inline hook) request.

System.Threading.CancellationToken cancellationToken

The cancellation token.

Returns
Type Description
System.Threading.Tasks.Task<IUser>

The created user.

Remarks

See Create User with Password Import Inline Hook in the documentation.

CreateUserAsync(CreateUserWithPasswordOptions, CancellationToken)

Creates a new user in your Okta organization with the specified password.

Declaration
Task<IUser> CreateUserAsync(CreateUserWithPasswordOptions options, CancellationToken cancellationToken = default(CancellationToken))
Parameters
Type Name Description
CreateUserWithPasswordOptions options

The options for this Create User (with password) request.

System.Threading.CancellationToken cancellationToken

The cancellation token.

Returns
Type Description
System.Threading.Tasks.Task<IUser>

The created user.

Remarks

See Create User with Password in the documentation.

CreateUserAsync(CreateUserWithProviderOptions, CancellationToken)

Creates a new user in your Okta organization with the specified authentication provider.

Declaration
Task<IUser> CreateUserAsync(CreateUserWithProviderOptions options, CancellationToken cancellationToken = default(CancellationToken))
Parameters
Type Name Description
CreateUserWithProviderOptions options

The options for this Create User (with authentication provider) request.

System.Threading.CancellationToken cancellationToken

The cancellation token.

Returns
Type Description
System.Threading.Tasks.Task<IUser>

The created user.

Remarks

See Create User with Authentication Provider in the documentation.

CreateUserAsync(CreateUserWithRecoveryQuestionOptions, CancellationToken)

Creates a new user in your Okta organization with a recovery question/answer (but no password).

Declaration
Task<IUser> CreateUserAsync(CreateUserWithRecoveryQuestionOptions options, CancellationToken cancellationToken = default(CancellationToken))
Parameters
Type Name Description
CreateUserWithRecoveryQuestionOptions options

The options for this Create User (with recovery question) request.

System.Threading.CancellationToken cancellationToken

The cancellation token.

Returns
Type Description
System.Threading.Tasks.Task<IUser>

The created user.

Remarks

See Create User with Recovery Question in the documentation.

CreateUserAsync(ICreateUserRequest, Nullable<Boolean>, Nullable<Boolean>, UserNextLogin, CancellationToken)

Creates a new user in your Okta organization with or without credentials.

Declaration
Task<IUser> CreateUserAsync(ICreateUserRequest body, bool? activate, bool? provider, UserNextLogin nextLogin = null, CancellationToken cancellationToken = default(CancellationToken))
Parameters
Type Name Description
ICreateUserRequest body

The ICreateUserRequest resource.

System.Nullable<System.Boolean> activate

Executes activation lifecycle operation when creating the user

System.Nullable<System.Boolean> provider

Indicates whether to create a user with a specified authentication provider

UserNextLogin nextLogin

With activate=true, set nextLogin to "changePassword" to have the password be EXPIRED, so user must change it the next time they log in.

System.Threading.CancellationToken cancellationToken

The cancellation token.

Returns
Type Description
System.Threading.Tasks.Task<IUser>

The IUser response.

DeactivateOrDeleteUserAsync(String)

Deletes a user permanently. This operation can only be performed on users that have a DEPROVISIONED status. This action cannot be recovered!

Declaration
Task DeactivateOrDeleteUserAsync(string userId)
Parameters
Type Name Description
System.String userId

The User ID

Returns
Type Description
System.Threading.Tasks.Task

A Task that represents the asynchronous operation.

Remarks

Explicit overload to support backward compatibility.

DeactivateOrDeleteUserAsync(String, Nullable<Boolean>, CancellationToken)

Deletes a user permanently. This operation can only be performed on users that have a DEPROVISIONED status. This action cannot be recovered!

Declaration
Task DeactivateOrDeleteUserAsync(string userId, bool? sendEmail, CancellationToken cancellationToken = default(CancellationToken))
Parameters
Type Name Description
System.String userId
System.Nullable<System.Boolean> sendEmail
System.Threading.CancellationToken cancellationToken

The cancellation token.

Returns
Type Description
System.Threading.Tasks.Task

A Task that represents the asynchronous operation.

DeactivateOrDeleteUserAsync(String, CancellationToken)

Deletes a user permanently. This operation can only be performed on users that have a DEPROVISIONED status. This action cannot be recovered!

Declaration
Task DeactivateOrDeleteUserAsync(string userId, CancellationToken cancellationToken = default(CancellationToken))
Parameters
Type Name Description
System.String userId

The User ID

System.Threading.CancellationToken cancellationToken

The cancellation token.

Returns
Type Description
System.Threading.Tasks.Task

A Task that represents the asynchronous operation.

Remarks

Explicit overload to support backward compatibility.

DeactivateUserAsync(String, Nullable<Boolean>, CancellationToken)

Deactivates a user. This operation can only be performed on users that do not have a DEPROVISIONED status. Deactivation of a user is an asynchronous operation. The user will have the transitioningToStatus property with a value of DEPROVISIONED during deactivation to indicate that the user hasn't completed the asynchronous operation. The user will have a status of DEPROVISIONED when the deactivation process is complete.

Declaration
Task DeactivateUserAsync(string userId, bool? sendEmail, CancellationToken cancellationToken = default(CancellationToken))
Parameters
Type Name Description
System.String userId
System.Nullable<System.Boolean> sendEmail
System.Threading.CancellationToken cancellationToken

The cancellation token.

Returns
Type Description
System.Threading.Tasks.Task

A Task that represents the asynchronous operation.

ExpirePasswordAndGetTemporaryPasswordAsync(String, CancellationToken)

This operation transitions the user to the status of PASSWORD_EXPIRED and the user's password is reset to a temporary password that is returned.

Declaration
Task<ITempPassword> ExpirePasswordAndGetTemporaryPasswordAsync(string userId, CancellationToken cancellationToken = default(CancellationToken))
Parameters
Type Name Description
System.String userId
System.Threading.CancellationToken cancellationToken

The cancellation token.

Returns
Type Description
System.Threading.Tasks.Task<ITempPassword>

The ITempPassword response.

ExpirePasswordAsync(String, CancellationToken)

This operation transitions the user to the status of PASSWORD_EXPIRED so that the user is required to change their password at their next login.

Declaration
Task<IUser> ExpirePasswordAsync(string userId, CancellationToken cancellationToken = default(CancellationToken))
Parameters
Type Name Description
System.String userId
System.Threading.CancellationToken cancellationToken

The cancellation token.

Returns
Type Description
System.Threading.Tasks.Task<IUser>

The IUser response.

ForgotPasswordGenerateOneTimeTokenAsync(String, Nullable<Boolean>, CancellationToken)

Generates a one-time token (OTT) that can be used to reset a user's password

Declaration
Task<IForgotPasswordResponse> ForgotPasswordGenerateOneTimeTokenAsync(string userId, bool? sendEmail, CancellationToken cancellationToken = default(CancellationToken))
Parameters
Type Name Description
System.String userId
System.Nullable<System.Boolean> sendEmail
System.Threading.CancellationToken cancellationToken

The cancellation token.

Returns
Type Description
System.Threading.Tasks.Task<IForgotPasswordResponse>

The IForgotPasswordResponse response.

ForgotPasswordSetNewPasswordAsync(IUserCredentials, String, Nullable<Boolean>, CancellationToken)

Sets a new password for a user by validating the user's answer to their current recovery question

Declaration
Task<IForgotPasswordResponse> ForgotPasswordSetNewPasswordAsync(IUserCredentials user, string userId, bool? sendEmail, CancellationToken cancellationToken = default(CancellationToken))
Parameters
Type Name Description
IUserCredentials user

The IUserCredentials resource.

System.String userId
System.Nullable<System.Boolean> sendEmail
System.Threading.CancellationToken cancellationToken

The cancellation token.

Returns
Type Description
System.Threading.Tasks.Task<IForgotPasswordResponse>

The IForgotPasswordResponse response.

GetLinkedObjectsForUser(String, String, String, Nullable<Int32>)

Get linked objects for a user, relationshipName can be a primary or associated relationship name

Declaration
ICollectionClient<IResponseLinks> GetLinkedObjectsForUser(string userId, string relationshipName, string after = null, int? limit)
Parameters
Type Name Description
System.String userId
System.String relationshipName
System.String after
System.Nullable<System.Int32> limit
Returns
Type Description
ICollectionClient<IResponseLinks>

A collection of IResponseLinks that can be enumerated asynchronously.

GetRefreshTokenForUserAndClientAsync(String, String, String, String, Nullable<Int32>, String, CancellationToken)

Gets a refresh token issued for the specified User and Client.

Declaration
Task<IOAuth2RefreshToken> GetRefreshTokenForUserAndClientAsync(string userId, string clientId, string tokenId, string expand = null, int? limit, string after = null, CancellationToken cancellationToken = default(CancellationToken))
Parameters
Type Name Description
System.String userId
System.String clientId
System.String tokenId
System.String expand
System.Nullable<System.Int32> limit
System.String after
System.Threading.CancellationToken cancellationToken

The cancellation token.

Returns
Type Description
System.Threading.Tasks.Task<IOAuth2RefreshToken>

The IOAuth2RefreshToken response.

GetUserAsync(String, CancellationToken)

Fetches a user from your Okta organization.

Declaration
Task<IUser> GetUserAsync(string userId, CancellationToken cancellationToken = default(CancellationToken))
Parameters
Type Name Description
System.String userId
System.Threading.CancellationToken cancellationToken

The cancellation token.

Returns
Type Description
System.Threading.Tasks.Task<IUser>

The IUser response.

GetUserGrantAsync(String, String, String, CancellationToken)

Gets a grant for the specified user

Declaration
Task<IOAuth2ScopeConsentGrant> GetUserGrantAsync(string userId, string grantId, string expand = null, CancellationToken cancellationToken = default(CancellationToken))
Parameters
Type Name Description
System.String userId
System.String grantId
System.String expand
System.Threading.CancellationToken cancellationToken

The cancellation token.

Returns
Type Description
System.Threading.Tasks.Task<IOAuth2ScopeConsentGrant>

The IOAuth2ScopeConsentGrant response.

ListApplicationTargetsForApplicationAdministratorRoleForUser(String, String, String, Nullable<Int32>)

Lists all App targets for an APP_ADMIN Role assigned to a User. This methods return list may include full Applications or Instances. The response for an instance will have an ID value, while Application will not have an ID.

Declaration
ICollectionClient<ICatalogApplication> ListApplicationTargetsForApplicationAdministratorRoleForUser(string userId, string roleId, string after = null, int? limit)
Parameters
Type Name Description
System.String userId
System.String roleId
System.String after
System.Nullable<System.Int32> limit
Returns
Type Description
ICollectionClient<ICatalogApplication>

A collection of ICatalogApplication that can be enumerated asynchronously.

ListAppLinks(String)

Fetches appLinks for all direct or indirect (via group membership) assigned applications.

Declaration
ICollectionClient<IAppLink> ListAppLinks(string userId)
Parameters
Type Name Description
System.String userId
Returns
Type Description
ICollectionClient<IAppLink>

A collection of IAppLink that can be enumerated asynchronously.

ListAssignedRolesForUser(String, String)

Lists all roles assigned to a user.

Declaration
ICollectionClient<IRole> ListAssignedRolesForUser(string userId, string expand = null)
Parameters
Type Name Description
System.String userId
System.String expand
Returns
Type Description
ICollectionClient<IRole>

A collection of IRole that can be enumerated asynchronously.

ListGrantsForUserAndClient(String, String, String, String, Nullable<Int32>)

Lists all grants for a specified user and client

Declaration
ICollectionClient<IOAuth2ScopeConsentGrant> ListGrantsForUserAndClient(string userId, string clientId, string expand = null, string after = null, int? limit)
Parameters
Type Name Description
System.String userId
System.String clientId
System.String expand
System.String after
System.Nullable<System.Int32> limit
Returns
Type Description
ICollectionClient<IOAuth2ScopeConsentGrant>

A collection of IOAuth2ScopeConsentGrant that can be enumerated asynchronously.

ListGroupTargetsForRole(String, String, String, Nullable<Int32>)

List all group targets given a role id.

Declaration
ICollectionClient<IGroup> ListGroupTargetsForRole(string userId, string roleId, string after = null, int? limit)
Parameters
Type Name Description
System.String userId
System.String roleId
System.String after
System.Nullable<System.Int32> limit
Returns
Type Description
ICollectionClient<IGroup>

A collection of IGroup that can be enumerated asynchronously.

ListRefreshTokensForUserAndClient(String, String, String, String, Nullable<Int32>)

Lists all refresh tokens issued for the specified User and Client.

Declaration
ICollectionClient<IOAuth2RefreshToken> ListRefreshTokensForUserAndClient(string userId, string clientId, string expand = null, string after = null, int? limit)
Parameters
Type Name Description
System.String userId
System.String clientId
System.String expand
System.String after
System.Nullable<System.Int32> limit
Returns
Type Description
ICollectionClient<IOAuth2RefreshToken>

A collection of IOAuth2RefreshToken that can be enumerated asynchronously.

ListUserClients(String)

Lists all client resources for which the specified user has grants or tokens.

Declaration
ICollectionClient<IOAuth2Client> ListUserClients(string userId)
Parameters
Type Name Description
System.String userId
Returns
Type Description
ICollectionClient<IOAuth2Client>

A collection of IOAuth2Client that can be enumerated asynchronously.

ListUserGrants(String, String, String, String, Nullable<Int32>)

Lists all grants for the specified user

Declaration
ICollectionClient<IOAuth2ScopeConsentGrant> ListUserGrants(string userId, string scopeId = null, string expand = null, string after = null, int? limit)
Parameters
Type Name Description
System.String userId
System.String scopeId
System.String expand
System.String after
System.Nullable<System.Int32> limit
Returns
Type Description
ICollectionClient<IOAuth2ScopeConsentGrant>

A collection of IOAuth2ScopeConsentGrant that can be enumerated asynchronously.

ListUserGroups(String)

Fetches the groups of which the user is a member.

Declaration
ICollectionClient<IGroup> ListUserGroups(string userId)
Parameters
Type Name Description
System.String userId
Returns
Type Description
ICollectionClient<IGroup>

A collection of IGroup that can be enumerated asynchronously.

ListUserIdentityProviders(String)

Lists the IdPs associated with the user.

Declaration
ICollectionClient<IIdentityProvider> ListUserIdentityProviders(string userId)
Parameters
Type Name Description
System.String userId
Returns
Type Description
ICollectionClient<IIdentityProvider>

A collection of IIdentityProvider that can be enumerated asynchronously.

ListUsers(String, String, Nullable<Int32>, String, String, String, String)

Lists users in your organization with pagination in most cases. A subset of users can be returned that match a supported filter expression or search criteria.

Declaration
ICollectionClient<IUser> ListUsers(string q = null, string after = null, int? limit, string filter = null, string search = null, string sortBy = null, string sortOrder = null)
Parameters
Type Name Description
System.String q

Finds a user that matches firstName, lastName, and email properties

System.String after

Specifies the pagination cursor for the next page of users

System.Nullable<System.Int32> limit

Specifies the number of results returned

System.String filter

Filters users with a supported expression for a subset of properties

System.String search

Searches for users with a supported filtering expression for most properties

System.String sortBy
System.String sortOrder
Returns
Type Description
ICollectionClient<IUser>

A collection of IUser that can be enumerated asynchronously.

PartialUpdateUserAsync(IUser, String, Nullable<Boolean>, CancellationToken)

Fetch a user by id, login, or login shortname if the short name is unambiguous.

Declaration
Task<IUser> PartialUpdateUserAsync(IUser user, string userId, bool? strict = default(bool? ), CancellationToken cancellationToken = default(CancellationToken))
Parameters
Type Name Description
IUser user

The IUser resource.

System.String userId
System.Nullable<System.Boolean> strict
System.Threading.CancellationToken cancellationToken

The cancellation token.

Returns
Type Description
System.Threading.Tasks.Task<IUser>

The IUser response.

ReactivateUserAsync(String, Nullable<Boolean>, CancellationToken)

Reactivates a user. This operation can only be performed on users with a PROVISIONED status. This operation restarts the activation workflow if for some reason the user activation was not completed when using the activationToken from Activate User.

Declaration
Task<IUserActivationToken> ReactivateUserAsync(string userId, bool? sendEmail, CancellationToken cancellationToken = default(CancellationToken))
Parameters
Type Name Description
System.String userId
System.Nullable<System.Boolean> sendEmail

Sends an activation email to the user if true

System.Threading.CancellationToken cancellationToken

The cancellation token.

Returns
Type Description
System.Threading.Tasks.Task<IUserActivationToken>

The IUserActivationToken response.

RemoveApplicationTargetFromAdministratorRoleForUserAsync(String, String, String, String, CancellationToken)

Remove App Instance Target to App Administrator Role given to a User

Declaration
Task RemoveApplicationTargetFromAdministratorRoleForUserAsync(string userId, string roleId, string appName, string applicationId, CancellationToken cancellationToken = default(CancellationToken))
Parameters
Type Name Description
System.String userId
System.String roleId
System.String appName
System.String applicationId
System.Threading.CancellationToken cancellationToken

The cancellation token.

Returns
Type Description
System.Threading.Tasks.Task

A Task that represents the asynchronous operation.

RemoveApplicationTargetFromApplicationAdministratorRoleForUserAsync(String, String, String, CancellationToken)

Success

Declaration
Task RemoveApplicationTargetFromApplicationAdministratorRoleForUserAsync(string userId, string roleId, string appName, CancellationToken cancellationToken = default(CancellationToken))
Parameters
Type Name Description
System.String userId
System.String roleId
System.String appName
System.Threading.CancellationToken cancellationToken

The cancellation token.

Returns
Type Description
System.Threading.Tasks.Task

A Task that represents the asynchronous operation.

RemoveGroupTargetFromRoleAsync(String, String, String, CancellationToken)

Removes a group target from a role assigned to a user.

Declaration
Task RemoveGroupTargetFromRoleAsync(string userId, string roleId, string groupId, CancellationToken cancellationToken = default(CancellationToken))
Parameters
Type Name Description
System.String userId
System.String roleId
System.String groupId
System.Threading.CancellationToken cancellationToken

The cancellation token.

Returns
Type Description
System.Threading.Tasks.Task

A Task that represents the asynchronous operation.

RemoveLinkedObjectForUserAsync(String, String, CancellationToken)

Delete linked objects for a user, relationshipName can be ONLY a primary relationship name

Declaration
Task RemoveLinkedObjectForUserAsync(string userId, string relationshipName, CancellationToken cancellationToken = default(CancellationToken))
Parameters
Type Name Description
System.String userId
System.String relationshipName
System.Threading.CancellationToken cancellationToken

The cancellation token.

Returns
Type Description
System.Threading.Tasks.Task

A Task that represents the asynchronous operation.

RemoveRoleFromUserAsync(String, String, CancellationToken)

Unassigns a role from a user.

Declaration
Task RemoveRoleFromUserAsync(string userId, string roleId, CancellationToken cancellationToken = default(CancellationToken))
Parameters
Type Name Description
System.String userId
System.String roleId
System.Threading.CancellationToken cancellationToken

The cancellation token.

Returns
Type Description
System.Threading.Tasks.Task

A Task that represents the asynchronous operation.

ResetFactorsAsync(String, CancellationToken)

This operation resets all factors for the specified user. All MFA factor enrollments returned to the unenrolled state. The user's status remains ACTIVE. This link is present only if the user is currently enrolled in one or more MFA factors.

Declaration
Task ResetFactorsAsync(string userId, CancellationToken cancellationToken = default(CancellationToken))
Parameters
Type Name Description
System.String userId
System.Threading.CancellationToken cancellationToken

The cancellation token.

Returns
Type Description
System.Threading.Tasks.Task

A Task that represents the asynchronous operation.

ResetPasswordAsync(String, Nullable<Boolean>, CancellationToken)

Generates a one-time token (OTT) that can be used to reset a user's password. The OTT link can be automatically emailed to the user or returned to the API caller and distributed using a custom flow.

Declaration
Task<IResetPasswordToken> ResetPasswordAsync(string userId, bool? sendEmail, CancellationToken cancellationToken = default(CancellationToken))
Parameters
Type Name Description
System.String userId
System.Nullable<System.Boolean> sendEmail
System.Threading.CancellationToken cancellationToken

The cancellation token.

Returns
Type Description
System.Threading.Tasks.Task<IResetPasswordToken>

The IResetPasswordToken response.

RevokeGrantsForUserAndClientAsync(String, String, CancellationToken)

Revokes all grants for the specified user and client

Declaration
Task RevokeGrantsForUserAndClientAsync(string userId, string clientId, CancellationToken cancellationToken = default(CancellationToken))
Parameters
Type Name Description
System.String userId
System.String clientId
System.Threading.CancellationToken cancellationToken

The cancellation token.

Returns
Type Description
System.Threading.Tasks.Task

A Task that represents the asynchronous operation.

RevokeTokenForUserAndClientAsync(String, String, String, CancellationToken)

Revokes the specified refresh token.

Declaration
Task RevokeTokenForUserAndClientAsync(string userId, string clientId, string tokenId, CancellationToken cancellationToken = default(CancellationToken))
Parameters
Type Name Description
System.String userId
System.String clientId
System.String tokenId
System.Threading.CancellationToken cancellationToken

The cancellation token.

Returns
Type Description
System.Threading.Tasks.Task

A Task that represents the asynchronous operation.

RevokeTokensForUserAndClientAsync(String, String, CancellationToken)

Revokes all refresh tokens issued for the specified User and Client.

Declaration
Task RevokeTokensForUserAndClientAsync(string userId, string clientId, CancellationToken cancellationToken = default(CancellationToken))
Parameters
Type Name Description
System.String userId
System.String clientId
System.Threading.CancellationToken cancellationToken

The cancellation token.

Returns
Type Description
System.Threading.Tasks.Task

A Task that represents the asynchronous operation.

RevokeUserGrantAsync(String, String, CancellationToken)

Revokes one grant for a specified user

Declaration
Task RevokeUserGrantAsync(string userId, string grantId, CancellationToken cancellationToken = default(CancellationToken))
Parameters
Type Name Description
System.String userId
System.String grantId
System.Threading.CancellationToken cancellationToken

The cancellation token.

Returns
Type Description
System.Threading.Tasks.Task

A Task that represents the asynchronous operation.

RevokeUserGrantsAsync(String, CancellationToken)

Revokes all grants for a specified user

Declaration
Task RevokeUserGrantsAsync(string userId, CancellationToken cancellationToken = default(CancellationToken))
Parameters
Type Name Description
System.String userId
System.Threading.CancellationToken cancellationToken

The cancellation token.

Returns
Type Description
System.Threading.Tasks.Task

A Task that represents the asynchronous operation.

SetLinkedObjectForUserAsync(String, String, String, CancellationToken)

Declaration
Task SetLinkedObjectForUserAsync(string associatedUserId, string primaryRelationshipName, string primaryUserId, CancellationToken cancellationToken = default(CancellationToken))
Parameters
Type Name Description
System.String associatedUserId
System.String primaryRelationshipName
System.String primaryUserId
System.Threading.CancellationToken cancellationToken

The cancellation token.

Returns
Type Description
System.Threading.Tasks.Task

A Task that represents the asynchronous operation.

SuspendUserAsync(String, CancellationToken)

Suspends a user. This operation can only be performed on users with an ACTIVE status. The user will have a status of SUSPENDED when the process is complete.

Declaration
Task SuspendUserAsync(string userId, CancellationToken cancellationToken = default(CancellationToken))
Parameters
Type Name Description
System.String userId
System.Threading.CancellationToken cancellationToken

The cancellation token.

Returns
Type Description
System.Threading.Tasks.Task

A Task that represents the asynchronous operation.

UnlockUserAsync(String, CancellationToken)

Unlocks a user with a LOCKED_OUT status and returns them to ACTIVE status. Users will be able to login with their current password.

Declaration
Task UnlockUserAsync(string userId, CancellationToken cancellationToken = default(CancellationToken))
Parameters
Type Name Description
System.String userId
System.Threading.CancellationToken cancellationToken

The cancellation token.

Returns
Type Description
System.Threading.Tasks.Task

A Task that represents the asynchronous operation.

UnsuspendUserAsync(String, CancellationToken)

Unsuspends a user and returns them to the ACTIVE state. This operation can only be performed on users that have a SUSPENDED status.

Declaration
Task UnsuspendUserAsync(string userId, CancellationToken cancellationToken = default(CancellationToken))
Parameters
Type Name Description
System.String userId
System.Threading.CancellationToken cancellationToken

The cancellation token.

Returns
Type Description
System.Threading.Tasks.Task

A Task that represents the asynchronous operation.

UpdateUserAsync(IUser, String, Nullable<Boolean>, CancellationToken)

Update a user's profile and/or credentials using strict-update semantics.

Declaration
Task<IUser> UpdateUserAsync(IUser user, string userId, bool? strict = default(bool? ), CancellationToken cancellationToken = default(CancellationToken))
Parameters
Type Name Description
IUser user

The IUser resource.

System.String userId
System.Nullable<System.Boolean> strict
System.Threading.CancellationToken cancellationToken

The cancellation token.

Returns
Type Description
System.Threading.Tasks.Task<IUser>

The IUser response.

UpdateUserAsync(IUser, String, CancellationToken)

Update a user's profile and/or credentials using strict-update semantics.

Declaration
Task<IUser> UpdateUserAsync(IUser user, string userId, CancellationToken cancellationToken = default(CancellationToken))
Parameters
Type Name Description
IUser user

The IUser resource.

System.String userId

The user ID.

System.Threading.CancellationToken cancellationToken

The cancellation token.

Returns
Type Description
System.Threading.Tasks.Task<IUser>

The IUser response.

Remarks

Explicit overload to support backward compatibility.

Back to top Copyright © 2021 Okta, Inc.
Generated with DocFx.