Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

UserType not properly assigned to a new user #388

Open
albestia opened this issue Sep 26, 2023 · 1 comment
Open

UserType not properly assigned to a new user #388

albestia opened this issue Sep 26, 2023 · 1 comment
Labels
awaiting-upstream The issue cannot be resolved without action in another repository (may be owned by Pulumi). kind/bug Some behavior is incorrect or out of spec

Comments

@albestia
Copy link

albestia commented Sep 26, 2023

What happened?

I've created a new userType with one new field and then try to create a new user of that type and fill in the custom field.
Failing because of unknown field.

Pulumi output:

Diagnostics:
  okta:user:User (*****):
    error: 1 error occurred:
        * failed to create user: the API returned an error: Api validation failed: newUser. Causes: errorSummary: Property name 'customProperty' is not defined in profile

Example

        const customUserType = new okta.user.UserType("custom-user-profile", {
            name: "custom_user_profile",
            displayName: "Custom User Profile",
            description: "Custom User profile for specific User Fields"
        }, {
            parent: this,
        });

        const randomCustomProperty = new okta.UserSchemaProperty("random-custom-property", {
            index: "customProperty",
            title: "customProperty",
            type: "string",
            userType: customUserType.id,
        });

        const oktaUser = new okta.user.User(user.login, {
            login: user.login,
            email: user.email,
            firstName: user.firstName || user.login,
            lastName: user.lastName || user.login,
            status: "ACTIVE",
            password: user.password,
            // Custom fields
            userType: customUserType.id,
            customProfileAttributes: "{ \"customProperty\": \"customValue\" }",
        }, {
            parent: this,
            dependsOn: [randomCustomProperty]
        });

Output of pulumi about

CLI
Version 3.73.0
Go Version go1.20.5
Go Compiler gc

Plugins
NAME VERSION
nodejs unknown
okta 4.4.0

Host
OS redhat
Version 7.9
Arch x86_64

This project is written in nodejs: executable='/******/bin/node' version='v16.19.0'

Dependencies:
NAME VERSION
@types/node 16.18.34
js-yaml 4.1.0
@pulumi/okta 4.4.0
@pulumi/pulumi 3.74.0
@types/js-yaml 4.0.5

(Just avoid providing company private config information)

Additional context

I've also tried to create the users without providing the customProfileAttributes and then it is created but the user type is the default one; instead there's a new field in Okta user named "userType" with the ID set to it.
Of course, there is no custom field on that newly created user.

Contributing

Vote on this issue by adding a 👍 reaction.
To contribute a fix for this issue, leave a comment (and link to your pull request, if you've opened one already).

@albestia albestia added kind/bug Some behavior is incorrect or out of spec needs-triage Needs attention from the triage team labels Sep 26, 2023
@mikhailshilkov
Copy link
Member

Thank you for reporting @albestia. This definitely sounds like an upstream issue to me. It looks related to okta/terraform-provider-okta#921 and okta/terraform-provider-okta#921 (comment). Unfortunately, that issue seems to be closed as stale without a fix :(

@mikhailshilkov mikhailshilkov added awaiting-upstream The issue cannot be resolved without action in another repository (may be owned by Pulumi). and removed needs-triage Needs attention from the triage team labels Sep 27, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
awaiting-upstream The issue cannot be resolved without action in another repository (may be owned by Pulumi). kind/bug Some behavior is incorrect or out of spec
Projects
None yet
Development

No branches or pull requests

2 participants