VMware Cloud Community
BOULA73
Enthusiast
Enthusiast
Jump to solution

How can find the upn of an account

Hi everyone

I migrate now of vRA 7.6 to vRA 8.10.

I correct my workflows, but i can not find the UPN ( account with domain) of my account. Existing a way for find it ? (with API or other)

Regards

Labels (1)
0 Kudos
1 Solution

Accepted Solutions
bdamian
Expert
Expert
Jump to solution

If you mean your Active Directory account, first of all, your account must be imported in vIDM and is required to have the following information: first name, last name, mail

Then, you can call the following APIs to get Users or Groups:

For users

  • URL: https://{vraHost}/csp/gateway/portal/api/orgs/{organizationId}/users/search?userSearchTerm={myuser}
  • Method: GET

For groups

  • URL: https://{{vraHost}}/csp/gateway/am/api/groups/search?searchTerm={mygroup}
  • Method: GET

If you mean the domain of the logged user, you can try:

  • URL: /csp/gateway/am/api/loggedin/user
  • Method: GET

 

---
Damián Bacalov
vExpert 2017-2023 (7 years)
https://www.linkedin.com/in/damianbacalov/
https://tecnologiaimasd.blogspot.com/
twitter @bdamian

View solution in original post

0 Kudos
2 Replies
Ankush11s
VMware Employee
VMware Employee
Jump to solution

Can you provide, more details of your user case 
If you want to fetch all the users which are part of a Project then it would be 

project-service/api/projects/{id}?apiVersion=2019-01-15

If you are looking to add the user to add the project 

/project-service/api/projects/{projectid}/principals?apiVersion=2019-01-15

 

 

{
  "modify": [
    {
      "email": "administrator@vmware.com",
      "id": "c493a95e-c4d1-4496-8595-e73902701c95:fe69d7ca-40a6-4de5-8f33-d462f4656938",
      "role": "member",
      "type": "user"
    }
  ],
  "remove": [
    {
      "email": "administrator@vmware.com",
      "id": "c493a95e-c4d1-4496-8595-e73902701c95:fe69d7ca-40a6-4de5-8f33-d462f4656938",
      "role": "member",
      "type": "user"
    }
  ]
}

 

with above payload 

0 Kudos
bdamian
Expert
Expert
Jump to solution

If you mean your Active Directory account, first of all, your account must be imported in vIDM and is required to have the following information: first name, last name, mail

Then, you can call the following APIs to get Users or Groups:

For users

  • URL: https://{vraHost}/csp/gateway/portal/api/orgs/{organizationId}/users/search?userSearchTerm={myuser}
  • Method: GET

For groups

  • URL: https://{{vraHost}}/csp/gateway/am/api/groups/search?searchTerm={mygroup}
  • Method: GET

If you mean the domain of the logged user, you can try:

  • URL: /csp/gateway/am/api/loggedin/user
  • Method: GET

 

---
Damián Bacalov
vExpert 2017-2023 (7 years)
https://www.linkedin.com/in/damianbacalov/
https://tecnologiaimasd.blogspot.com/
twitter @bdamian
0 Kudos