okta / okta-sdk-dotnet

A .NET SDK for interacting with the Okta management API, enabling server-side code to manage Okta users, groups, applications, and more.
Other
157 stars 100 forks source link

The CreateUserAsync creates federated user in pending activation state #748

Open webteckie opened 5 days ago

webteckie commented 5 days ago

Describe the bug?

Upgraded to v9.0.0 and the following code fails to create a federated user:

        var newUser = await _userApi.CreateUserAsync(new CreateUserRequest
        {
            Profile = new UserProfile
            {
                FirstName = firstName,
                LastName = lastName,
                Email = email,
                Login = email,
                AdditionalProperties = additionalProperties
            },
            Credentials = new UserCredentials
            {
                Provider = new AuthenticationProvider
                {
                    Type = AuthenticationProviderType.FEDERATION,
                }
            }
        }, true, true, null, cancellationToken);

The result is a user that has OKTA as the type and the user is created in the Pending user action state :

image

What is expected to happen?

Create the user as a federation user and in the active state.

What is the actual behavior?

The result is a user that has OKTA as the provider type and the user is created in the Pending user action state.

Reproduction Steps?

Use the provided code to add the user.

Additional Information?

No response

.NET Version

8.0.403

SDK Version

9.0.0

OS version

No response

bryanapellanes-okta commented 15 hours ago

@webteckie Thanks for bringing this to our attention. At first glance this appears to be an issue with the API, I've entered an internal issue for prioritization and tracking: OKTA-821863. We will work with the appropriate team to address the issue.