OCISDK/OCISDK/Identity/identityClient.cs
/// <summary>
/// Creates a new Console one-time password for the specified user. For more information about user credentials, see User Credentials.
/// 
/// Use this operation after creating a new user, or if a user forgets their password. 
/// The new one-time password is returned to you in the response, and you must securely deliver it to the user. 
/// They'll be prompted to change this password the next time they sign in to the Console. 
/// If they don't change it within 7 days, the password will expire and you'll need to create a new one-time password for the user.
/// 
/// Note: The user's Console login is the unique name you specified when you created the user (see CreateUser).
/// </summary>
/// <param name="request"></param>
/// <returns></returns>
Creates a new Console one-time password for the specified user. For more information about user credentials, see User Credentials.

Use this operation after creating a new user, or if a user forgets their password.
The new one-time password is returned to you in the response, and you must securely deliver it to the user.
They'll be prompted to change this password the next time they sign in to the Console.
If they don't change it within 7 days, the password will expire and you'll need to create a new one-time password for the user.

The user's Console login is the unique name you specified when you created the user .
Creates a new Console one - time password for the specified user . For more information about user credentials see User Credentials . Use this operation after creating a new user or if a user forgets their password . The new one - time password is returned to you in the response and you must securely deliver it to the user . They ' ll be prompted to change this password the next time they sign in to the Console . If they don ' t change it within 7 days the password will expire and you ' ll need to create a new one - time password for the user . The user ' s Console login is the unique name you specified when you created the user .
public CreateOrResetUIPasswordResponse CreateOrResetUIPassword(CreateOrResetUIPasswordRequest request)
        {
            var uri = new Uri($"{GetEndPoint(IdentityServices.Users, this.Region)}/{request.UserId}/uiPassword");
            using (var webResponse = this.RestClient.Post(uri, null, new HttpRequestHeaderParam() { OpcRetryToken = request.OpcRetryToken }))
            using (var stream = webResponse.GetResponseStream())
            using (var reader = new StreamReader(stream))
            {
                var response = reader.ReadToEnd();
                return new CreateOrResetUIPasswordResponse()
                {
                    UIPassword = JsonSerializer.Deserialize<UIPasswordDetails>(response),
                    OpcRequestId = webResponse.Headers.Get("opc-request-id"),
                    ETag = webResponse.Headers.Get("etag")
                };
            }
        }
public CreateOrResetUIPasswordResponse CreateOrResetUIPassword ( CreateOrResetUIPasswordRequest request ) { var uri = new Uri ( $" { GetEndPoint ( IdentityServices . Users , this . Region ) } / { request . UserId } /uiPassword " ) ; using ( var webResponse = this . RestClient . Post ( uri , null , new HttpRequestHeaderParam ( ) { OpcRetryToken = request . OpcRetryToken } ) ) using ( var stream = webResponse . GetResponseStream ( ) ) using ( var reader = new StreamReader ( stream ) ) { var response = reader . ReadToEnd ( ) ; return new CreateOrResetUIPasswordResponse ( ) { UIPassword = JsonSerializer . Deserialize < UIPasswordDetails > ( response ) , OpcRequestId = webResponse . Headers . Get ( " " ) , ETag = webResponse . Headers . Get ( " " ) } ; } }
Creates a new Console one-time password for the specified user.
Creates a new Console one - time password for the specified user .
None
request
CreateOrResetUIPasswordRequest
None