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

Issue creating user with management API

Hello everyone,

I´m trying to create a User using the Management API, but I´ve found some issues on our Private Cloud Installation 4.19.01:

First I created the User using the POST call:

https://apidocs.apigee.com/management/apis/post/users

{ 
   "firstName" : "myName", 
   "lastName" : "myLastname", 
   "password" : "not_used", 
   "emailId" : "myMail@my.domain.de" 
}

After that, I can query the users with

https://apidocs.apigee.com/management/apis/get/users

and I get the users listed (including the new one)

{
    "user": [
        {
            "name": "someUser@my.domain.de"
        },
        {
            "name": "myMail@my.domain.de"
        }
    ]
}

But when I query the User Info, I get an Error saying that the user does not exists.

https://apidocs.apigee.com/management/apis/get/users/%7Buser_email%7D

{
    "code": "usersandroles.UserDoesNotExist",
    "message": "User myMail@my.domain.de does not exist",
    "contexts": []
}

Also I cannot delete the user, because it says the user does not exists.

Anyone had such an Issue?

Thanks in advance

Solved Solved
0 7 848
1 ACCEPTED SOLUTION

The issue was in the user definition:

You can create a User globally or for an specific Org.

  • If the user is created for an specific Org using "v1/org/myOrg/users", then it won´t be listed in the Edge-UI until you add it to any role in the Org. BUT you won´t be able to login in the Edge UI and you won´t see the user details either.
  • In this case, you should make any interactions (for example DELETE) also using "v1/org/myOrg/users", because you won´t get any details using GET "v1/users"
  • Also even if "v1/users" doesn´t find the user, you won´t be able to create one there, because there is actually a user, but it´s just not reacheable as global, but only on the org.

Therefore better create the user globally using "v1/users", so that they can login, you can view the Info in the Edge UI and so on.

Thanks @Nagashree B for your help

View solution in original post

7 REPLIES 7
Top Solution Authors