Get hands-on experience with 20+ free Google Cloud products and $300 in free credit for new customers.

Issues in creating user via API

Hi,

I am using Apigee on prem Version 4.19.01.00. My goal is to create a custom role and have a dummy user associated with that role i.e. it will not be backed by a valid email address, so I will have to set the password via the api.

Approach 1:

  1. Create the custom role.
  2. Create a user via the Edge UI and associate the role to the user. (Note: I cannot set the password in this step)
  3. Update/Set the password for the user via an api call.

On this last step I encounter the following error:

{
    "code": "usersandroles.UserDoesNotExist",
    "message": "User custom.role2@domain.com does not exist",
    "contexts": []
}

which is strange as I can see the exact email address in the Org Users page. Also if I try to create a user via the API using the same email address it complains saying:

{
    "code": "usersandroles.EmailIdAlreadyExists",
    "message": "EmailId:custom.role2@domain.com already exists",
    "contexts": []
}

Strange.

Approach 2:

  1. Create the custom role.
  2. Create the user via the api (This way I can set the password for the user but not from the UI. Hmmm!)
  3. The user is not visible in the Org Users page (probably a "feature") as it is not associated with any roles yet.
  4. Associate the user with the role via an api call
  5. Try to view the user on the Edge UI

At this step, the UI runs into some error and shows me the following error messages at the top:

Error fetching Userroles, Error fetching User
Open to view all 2 messages
Dismiss All
×   Error fetching Userroles
User customrole4@domain.com does not exist.
×   Error fetching User
User customrole4@domain.com does not exist.

Am I doing something wrong here? Or are these defects?

0 1 193
1 REPLY 1
Top Solution Authors