User created but still getting the error user does not exist

We created a testuser using the following API:

curl -X POST \
https://api.enterprise.apigee.net/v1/o/<org-name>/users \
-H 'authorization: Basic ####==' \
-H 'cache-control: no-cache' \
-H 'content-type: application/json' \
-H 'postman-token: 2665e8b2-2447-7549-6bf5-ec9495f63437' \
-d '{
"firstName" : "test",
"lastName" : "user",
"password" : "Test123!",
"emailId" : "testuser@domain.com"
}'

However, we are getting errors for the user when we try the following:

1. The user could not log in (saying username/password incorrect).
2. While accessing the user record with orgadmin, getting this:

Error fetching Userroles
User testuser@domain.com does not exist.
Solved Solved
0 1 936
1 ACCEPTED SOLUTION

After investigation it was noticed that the errors were seen because of the following reasons:

1. All the Edge users are global users, which are created outside of any organization. Later the users can be tied to any specific userrole in any organization.


2. However, the user "testuser@domain.com" was created in a specific organization "<org-name>".

3. When we try to click on the user email address and try to fetch the information, the Edge UI tries to fetch the users at the global level, that is
https://api.enterprise.apigee.com/v1/users/testuser@domain.com

Since the user testuser@domain.com does not exist at that level, we get the error:

Error fetching Userroles
User test126@domain.com does not exist. 

Solution:

To address this issue we need to create global users.

In Public/Private Cloud,

1) You can either use Edge UI to add the user (or you can open a ticket with us to add the user) OR

2) When the user registers for a free Edge cloud account at https://login.apigee.com/sign_up, Edge automatically creates a global user. Then another organization administrator can add the user to their organization.

In Private Cloud,

A system administrator can create a global user using the following API:

curl -H "Content-Type:application/xml" -u <sysAdminEmail:pword> \
  -X POST https://<ms_IP>:8080/v1/users \
  -d '<User> \
    <FirstName>Foo</FirstName> \
    <LastName>Bar</LastName> \
    <Password>myPword</Password> \
    <EmailId>foo@bar.com</EmailId> \
  </User>'


More information:

More information can be found about this in the following links:

a) About Global users

b) Adding global users

c) More information about managing users, roles and permissions

View solution in original post

1 REPLY 1

After investigation it was noticed that the errors were seen because of the following reasons:

1. All the Edge users are global users, which are created outside of any organization. Later the users can be tied to any specific userrole in any organization.


2. However, the user "testuser@domain.com" was created in a specific organization "<org-name>".

3. When we try to click on the user email address and try to fetch the information, the Edge UI tries to fetch the users at the global level, that is
https://api.enterprise.apigee.com/v1/users/testuser@domain.com

Since the user testuser@domain.com does not exist at that level, we get the error:

Error fetching Userroles
User test126@domain.com does not exist. 

Solution:

To address this issue we need to create global users.

In Public/Private Cloud,

1) You can either use Edge UI to add the user (or you can open a ticket with us to add the user) OR

2) When the user registers for a free Edge cloud account at https://login.apigee.com/sign_up, Edge automatically creates a global user. Then another organization administrator can add the user to their organization.

In Private Cloud,

A system administrator can create a global user using the following API:

curl -H "Content-Type:application/xml" -u <sysAdminEmail:pword> \
  -X POST https://<ms_IP>:8080/v1/users \
  -d '<User> \
    <FirstName>Foo</FirstName> \
    <LastName>Bar</LastName> \
    <Password>myPword</Password> \
    <EmailId>foo@bar.com</EmailId> \
  </User>'


More information:

More information can be found about this in the following links:

a) About Global users

b) Adding global users

c) More information about managing users, roles and permissions