When a user signs on for the first time, I want to force the user to change the password they are given.
I am able to create the user with a password.
And then activate the user, with an email (which is what I want). (See below)
But, I can not figure out a way, using the OKTA SDK for dotNote, to then expire the password to force the user to change it.
I did find information related to nextLogin = changePassword. But, I can’t seem to figure out how to use it with the SDK. (See below.)
Within the SDK there is a UserNextLogin class but I don’t know if that as anything to do with it.
Any help would be appreciated.
        var oktaUser = await client.Users.CreateUserAsync(new CreateUserWithPasswordOptions
        {
            // User profile object
            Profile = new UserProfile
            {
                FirstName = "Anakin8",
                LastName = "Skywalker8",
                Email = "test@gmail.com",
                Login = "darth.vader12345678",
                
            },
            Password = "D1sturB1ng!",
            Activate = false,
        });
        await oktaUser.ActivateAsync(sendEmail: false);
        var userNestNextLogin = UserNextLogin.ChangePassword;