API version:
Show / Hide Table of Contents

Interface IUser

Represents a User resource in the Okta API.

Inherited Members
IResource.Item[String]
IResource.GetArrayProperty<T>(String)
IResource.GetData()
IResource.SetProperty(String, Object)
IResource.GetProperty<T>(String)
Namespace: Okta.Sdk
Assembly: Okta.Sdk.dll
Syntax
public interface IUser : IResource

Properties

Activated

Declaration
DateTimeOffset? Activated { get; }
Property Value
Type Description
System.Nullable<System.DateTimeOffset>

AppLinks

Gets a collection of IAppLink that can be enumerated asynchronously

Declaration
IAsyncEnumerable<IAppLink> AppLinks { get; }
Property Value
Type Description
System.Collections.Generic.IAsyncEnumerable<IAppLink>

Created

Declaration
DateTimeOffset? Created { get; }
Property Value
Type Description
System.Nullable<System.DateTimeOffset>

Credentials

Declaration
IUserCredentials Credentials { get; set; }
Property Value
Type Description
IUserCredentials

Factors

Gets a collection of IUserFactor that can be enumerated asynchronously

Declaration
IAsyncEnumerable<IUserFactor> Factors { get; }
Property Value
Type Description
System.Collections.Generic.IAsyncEnumerable<IUserFactor>

Groups

Gets a collection of IGroup that can be enumerated asynchronously

Declaration
IAsyncEnumerable<IGroup> Groups { get; }
Property Value
Type Description
System.Collections.Generic.IAsyncEnumerable<IGroup>

Id

Declaration
string Id { get; }
Property Value
Type Description
System.String

LastLogin

Declaration
DateTimeOffset? LastLogin { get; }
Property Value
Type Description
System.Nullable<System.DateTimeOffset>

LastUpdated

Declaration
DateTimeOffset? LastUpdated { get; }
Property Value
Type Description
System.Nullable<System.DateTimeOffset>

PasswordChanged

Declaration
DateTimeOffset? PasswordChanged { get; }
Property Value
Type Description
System.Nullable<System.DateTimeOffset>

Profile

Declaration
IUserProfile Profile { get; set; }
Property Value
Type Description
IUserProfile

Roles

Gets a collection of IRole that can be enumerated asynchronously

Declaration
IAsyncEnumerable<IRole> Roles { get; }
Property Value
Type Description
System.Collections.Generic.IAsyncEnumerable<IRole>

Status

Declaration
UserStatus Status { get; }
Property Value
Type Description
UserStatus

StatusChanged

Declaration
DateTimeOffset? StatusChanged { get; }
Property Value
Type Description
System.Nullable<System.DateTimeOffset>

TransitioningToStatus

Declaration
UserStatus TransitioningToStatus { get; }
Property Value
Type Description
UserStatus

Type

Declaration
IUserType Type { get; set; }
Property Value
Type Description
IUserType

Methods

ActivateAsync(Nullable<Boolean>, CancellationToken)

Declaration
Task<IUserActivationToken> ActivateAsync(bool? sendEmail, CancellationToken cancellationToken = default(CancellationToken))
Parameters
Type Name Description
System.Nullable<System.Boolean> sendEmail
System.Threading.CancellationToken cancellationToken
Returns
Type Description
System.Threading.Tasks.Task<IUserActivationToken>

AddAllAppsAsTargetAsync(String, CancellationToken)

Declaration
Task AddAllAppsAsTargetAsync(string roleId, CancellationToken cancellationToken = default(CancellationToken))
Parameters
Type Name Description
System.String roleId
System.Threading.CancellationToken cancellationToken
Returns
Type Description
System.Threading.Tasks.Task

AddFactorAsync(AddCallFactorOptions, CancellationToken)

Adds a call factor to the user

Declaration
Task<IUserFactor> AddFactorAsync(AddCallFactorOptions callFactorOptions, CancellationToken cancellationToken = default(CancellationToken))
Parameters
Type Name Description
AddCallFactorOptions callFactorOptions

The call factor options

System.Threading.CancellationToken cancellationToken

The cancellation token

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

The IUserFactor response

AddFactorAsync(AddCustomHotpFactorOptions, CancellationToken)

Adds a token:hotp factor to the user

Declaration
Task<IUserFactor> AddFactorAsync(AddCustomHotpFactorOptions hotpFactorOptions, CancellationToken cancellationToken = default(CancellationToken))
Parameters
Type Name Description
AddCustomHotpFactorOptions hotpFactorOptions

The token:hotp options

System.Threading.CancellationToken cancellationToken

The cancellation token

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

The IUserFactor response

AddFactorAsync(AddEmailFactorOptions, CancellationToken)

Adds an email factor to the user

Declaration
Task<IUserFactor> AddFactorAsync(AddEmailFactorOptions emailFactorOptions, CancellationToken cancellationToken = default(CancellationToken))
Parameters
Type Name Description
AddEmailFactorOptions emailFactorOptions

The email factor options

System.Threading.CancellationToken cancellationToken

The cancellation token

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

The IUserFactor response

AddFactorAsync(AddHardwareFactorOptions, CancellationToken)

Adds a hardware factor to the user

Declaration
Task<IUserFactor> AddFactorAsync(AddHardwareFactorOptions hardwareFactorOptions, CancellationToken cancellationToken = default(CancellationToken))
Parameters
Type Name Description
AddHardwareFactorOptions hardwareFactorOptions

The hardware factor options

System.Threading.CancellationToken cancellationToken

The cancellation token

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

The IUserFactor response

AddFactorAsync(AddPushFactorOptions, CancellationToken)

Adds a push factor to the user

Declaration
Task<IUserFactor> AddFactorAsync(AddPushFactorOptions pushFactorOptions, CancellationToken cancellationToken = default(CancellationToken))
Parameters
Type Name Description
AddPushFactorOptions pushFactorOptions

The push factor options

System.Threading.CancellationToken cancellationToken

The cancellation token

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

The IUserFactor response

AddFactorAsync(AddSecurityQuestionFactorOptions, CancellationToken)

Adds a security question factor to the user

Declaration
Task<IUserFactor> AddFactorAsync(AddSecurityQuestionFactorOptions securityQuestionFactorOptions, CancellationToken cancellationToken = default(CancellationToken))
Parameters
Type Name Description
AddSecurityQuestionFactorOptions securityQuestionFactorOptions

The security question options

System.Threading.CancellationToken cancellationToken

The cancellation token

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

The IUserFactor response

AddFactorAsync(AddSmsFactorOptions, CancellationToken)

Adds an SMS factor to the user

Declaration
Task<IUserFactor> AddFactorAsync(AddSmsFactorOptions smsFactorOptions, CancellationToken cancellationToken = default(CancellationToken))
Parameters
Type Name Description
AddSmsFactorOptions smsFactorOptions

The SMS factor options

System.Threading.CancellationToken cancellationToken

The cancellation token

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

The IUserFactor response

AddFactorAsync(AddTokenFactorOptions, CancellationToken)

Adds a token factor to the user

Declaration
Task<IUserFactor> AddFactorAsync(AddTokenFactorOptions tokenFactorOptions, CancellationToken cancellationToken = default(CancellationToken))
Parameters
Type Name Description
AddTokenFactorOptions tokenFactorOptions

The token factor options

System.Threading.CancellationToken cancellationToken

The cancellation token

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

The IUserFactor response

AddFactorAsync(AddTotpFactorOptions, CancellationToken)

Adds a token:software:totp factor to the user

Declaration
Task<IUserFactor> AddFactorAsync(AddTotpFactorOptions totpFactorOptions, CancellationToken cancellationToken = default(CancellationToken))
Parameters
Type Name Description
AddTotpFactorOptions totpFactorOptions

The token:software:totp options

System.Threading.CancellationToken cancellationToken

The cancellation token

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

The IUserFactor response

AddGroupTargetAsync(String, String, CancellationToken)

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

AddToGroupAsync(String, CancellationToken)

Declaration
Task AddToGroupAsync(string groupId, CancellationToken cancellationToken = default(CancellationToken))
Parameters
Type Name Description
System.String groupId
System.Threading.CancellationToken cancellationToken
Returns
Type Description
System.Threading.Tasks.Task

AssignRoleAsync(IAssignRoleRequest, String, CancellationToken)

Declaration
Task<IRole> AssignRoleAsync(IAssignRoleRequest assignRoleRequest, string disableNotifications = null, CancellationToken cancellationToken = default(CancellationToken))
Parameters
Type Name Description
IAssignRoleRequest assignRoleRequest
System.String disableNotifications
System.Threading.CancellationToken cancellationToken
Returns
Type Description
System.Threading.Tasks.Task<IRole>

ChangePasswordAsync(ChangePasswordOptions, CancellationToken)

Changes the user password

Declaration
Task<IUserCredentials> ChangePasswordAsync(ChangePasswordOptions options, CancellationToken cancellationToken = default(CancellationToken))
Parameters
Type Name Description
ChangePasswordOptions options

The password options

System.Threading.CancellationToken cancellationToken

The cancellation token

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

The IUserCredentials response

ChangeRecoveryQuestionAsync(ChangeRecoveryQuestionOptions, CancellationToken)

Changes the user recovery question

Declaration
Task ChangeRecoveryQuestionAsync(ChangeRecoveryQuestionOptions options, CancellationToken cancellationToken = default(CancellationToken))
Parameters
Type Name Description
ChangeRecoveryQuestionOptions options

The recovery question options

System.Threading.CancellationToken cancellationToken

The cancellation token

Returns
Type Description
System.Threading.Tasks.Task

The asynchronous task

ClearSessionsAsync(Nullable<Boolean>, CancellationToken)

Declaration
Task ClearSessionsAsync(bool? oauthTokens, CancellationToken cancellationToken = default(CancellationToken))
Parameters
Type Name Description
System.Nullable<System.Boolean> oauthTokens
System.Threading.CancellationToken cancellationToken
Returns
Type Description
System.Threading.Tasks.Task

DeactivateAsync()

Deactivates a user.

Declaration
Task DeactivateAsync()
Returns
Type Description
System.Threading.Tasks.Task

The asynchronous task

Remarks

Explicit overload to support backward compatibility.

DeactivateAsync(Nullable<Boolean>, CancellationToken)

Declaration
Task DeactivateAsync(bool? sendEmail, CancellationToken cancellationToken = default(CancellationToken))
Parameters
Type Name Description
System.Nullable<System.Boolean> sendEmail
System.Threading.CancellationToken cancellationToken
Returns
Type Description
System.Threading.Tasks.Task

DeactivateAsync(CancellationToken)

Deactivates a user

Declaration
Task DeactivateAsync(CancellationToken cancellationToken = default(CancellationToken))
Parameters
Type Name Description
System.Threading.CancellationToken cancellationToken

The cancellation token

Returns
Type Description
System.Threading.Tasks.Task

The asynchronous task

Remarks

Explicit overload to support backward compatibility.

DeactivateOrDeleteAsync(Nullable<Boolean>, CancellationToken)

Deletes a deactivated user

Declaration
Task DeactivateOrDeleteAsync(bool? sendEmail, CancellationToken cancellationToken = default(CancellationToken))
Parameters
Type Name Description
System.Nullable<System.Boolean> sendEmail

The send email flag

System.Threading.CancellationToken cancellationToken

The cancellation token

Returns
Type Description
System.Threading.Tasks.Task

The asynchronous task

DeleteFactorAsync(String, CancellationToken)

Declaration
Task DeleteFactorAsync(string factorId, CancellationToken cancellationToken = default(CancellationToken))
Parameters
Type Name Description
System.String factorId
System.Threading.CancellationToken cancellationToken
Returns
Type Description
System.Threading.Tasks.Task

EnrollFactorAsync(IUserFactor, Nullable<Boolean>, String, Nullable<Int32>, Nullable<Boolean>, CancellationToken)

Declaration
Task<IUserFactor> EnrollFactorAsync(IUserFactor body, bool? updatePhone, string templateId = null, int? tokenLifetimeSeconds, bool? activate, CancellationToken cancellationToken = default(CancellationToken))
Parameters
Type Name Description
IUserFactor body
System.Nullable<System.Boolean> updatePhone
System.String templateId
System.Nullable<System.Int32> tokenLifetimeSeconds
System.Nullable<System.Boolean> activate
System.Threading.CancellationToken cancellationToken
Returns
Type Description
System.Threading.Tasks.Task<IUserFactor>

ExpirePasswordAndGetTemporaryPasswordAsync(CancellationToken)

Declaration
Task<ITempPassword> ExpirePasswordAndGetTemporaryPasswordAsync(CancellationToken cancellationToken = default(CancellationToken))
Parameters
Type Name Description
System.Threading.CancellationToken cancellationToken
Returns
Type Description
System.Threading.Tasks.Task<ITempPassword>

ExpirePasswordAsync(CancellationToken)

Declaration
Task<IUser> ExpirePasswordAsync(CancellationToken cancellationToken = default(CancellationToken))
Parameters
Type Name Description
System.Threading.CancellationToken cancellationToken
Returns
Type Description
System.Threading.Tasks.Task<IUser>

ForgotPasswordGenerateOneTimeTokenAsync(Nullable<Boolean>, CancellationToken)

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

ForgotPasswordSetNewPasswordAsync(IUserCredentials, Nullable<Boolean>, CancellationToken)

Declaration
Task<IForgotPasswordResponse> ForgotPasswordSetNewPasswordAsync(IUserCredentials user, bool? sendEmail, CancellationToken cancellationToken = default(CancellationToken))
Parameters
Type Name Description
IUserCredentials user
System.Nullable<System.Boolean> sendEmail
System.Threading.CancellationToken cancellationToken
Returns
Type Description
System.Threading.Tasks.Task<IForgotPasswordResponse>

GetFactorAsync(String, CancellationToken)

Declaration
Task<IUserFactor> GetFactorAsync(string factorId, CancellationToken cancellationToken = default(CancellationToken))
Parameters
Type Name Description
System.String factorId
System.Threading.CancellationToken cancellationToken
Returns
Type Description
System.Threading.Tasks.Task<IUserFactor>

GetLinkedObjects(String, String, Nullable<Int32>)

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

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

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

ListAssignedRoles(String)

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

ListClients()

Declaration
ICollectionClient<IOAuth2Client> ListClients()
Returns
Type Description
ICollectionClient<IOAuth2Client>

ListFactors()

Declaration
ICollectionClient<IUserFactor> ListFactors()
Returns
Type Description
ICollectionClient<IUserFactor>

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

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

ListGroupTargets(String, String, Nullable<Int32>)

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

ListIdentityProviders()

Declaration
ICollectionClient<IIdentityProvider> ListIdentityProviders()
Returns
Type Description
ICollectionClient<IIdentityProvider>

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

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

ListSupportedFactors()

Declaration
ICollectionClient<IUserFactor> ListSupportedFactors()
Returns
Type Description
ICollectionClient<IUserFactor>

ListSupportedSecurityQuestions()

Declaration
ICollectionClient<ISecurityQuestion> ListSupportedSecurityQuestions()
Returns
Type Description
ICollectionClient<ISecurityQuestion>

ReactivateAsync(Nullable<Boolean>, CancellationToken)

Declaration
Task<IUserActivationToken> ReactivateAsync(bool? sendEmail, CancellationToken cancellationToken = default(CancellationToken))
Parameters
Type Name Description
System.Nullable<System.Boolean> sendEmail
System.Threading.CancellationToken cancellationToken
Returns
Type Description
System.Threading.Tasks.Task<IUserActivationToken>

RemoveFromGroupAsync(String, CancellationToken)

Removes a user from a group

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

The group id

System.Threading.CancellationToken cancellationToken

The cancellation token

Returns
Type Description
System.Threading.Tasks.Task

The asynchronous task

RemoveGroupTargetAsync(String, String, CancellationToken)

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

RemoveLinkedObjectAsync(String, CancellationToken)

Declaration
Task RemoveLinkedObjectAsync(string relationshipName, CancellationToken cancellationToken = default(CancellationToken))
Parameters
Type Name Description
System.String relationshipName
System.Threading.CancellationToken cancellationToken
Returns
Type Description
System.Threading.Tasks.Task

RemoveRoleAsync(String, CancellationToken)

Declaration
Task RemoveRoleAsync(string roleId, CancellationToken cancellationToken = default(CancellationToken))
Parameters
Type Name Description
System.String roleId
System.Threading.CancellationToken cancellationToken
Returns
Type Description
System.Threading.Tasks.Task

ResetFactorsAsync(CancellationToken)

Declaration
Task ResetFactorsAsync(CancellationToken cancellationToken = default(CancellationToken))
Parameters
Type Name Description
System.Threading.CancellationToken cancellationToken
Returns
Type Description
System.Threading.Tasks.Task

ResetPasswordAsync(Nullable<Boolean>, CancellationToken)

Resets the user password

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

The send email flag

System.Threading.CancellationToken cancellationToken

The cancellation token

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

The IResetPasswordToken response

RevokeGrantAsync(String, CancellationToken)

Declaration
Task RevokeGrantAsync(string grantId, CancellationToken cancellationToken = default(CancellationToken))
Parameters
Type Name Description
System.String grantId
System.Threading.CancellationToken cancellationToken
Returns
Type Description
System.Threading.Tasks.Task

RevokeGrantsAsync(CancellationToken)

Declaration
Task RevokeGrantsAsync(CancellationToken cancellationToken = default(CancellationToken))
Parameters
Type Name Description
System.Threading.CancellationToken cancellationToken
Returns
Type Description
System.Threading.Tasks.Task

RevokeGrantsForUserAndClientAsync(String, CancellationToken)

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

RevokeTokenForUserAndClientAsync(String, String, CancellationToken)

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

RevokeTokensForUserAndClientAsync(String, CancellationToken)

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

SetLinkedObjectAsync(String, String, CancellationToken)

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

SuspendAsync(CancellationToken)

Declaration
Task SuspendAsync(CancellationToken cancellationToken = default(CancellationToken))
Parameters
Type Name Description
System.Threading.CancellationToken cancellationToken
Returns
Type Description
System.Threading.Tasks.Task

UnlockAsync(CancellationToken)

Declaration
Task UnlockAsync(CancellationToken cancellationToken = default(CancellationToken))
Parameters
Type Name Description
System.Threading.CancellationToken cancellationToken
Returns
Type Description
System.Threading.Tasks.Task

UnsuspendAsync(CancellationToken)

Declaration
Task UnsuspendAsync(CancellationToken cancellationToken = default(CancellationToken))
Parameters
Type Name Description
System.Threading.CancellationToken cancellationToken
Returns
Type Description
System.Threading.Tasks.Task

UpdateAsync(CancellationToken)

Saves changes and returns the updated resource.

Declaration
Task<IUser> UpdateAsync(CancellationToken cancellationToken = default(CancellationToken))
Parameters
Type Name Description
System.Threading.CancellationToken cancellationToken

The cancellation token.

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

The updated IUser.

Remarks

Alias of UpdateUserAsync(IUser, String, CancellationToken).

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