Use Subject Query from Azure DevOps API Graph
Ref: https://docs.microsoft.com/en-us/rest/api/azure/devops/graph/subject%20query/query?view=azure-devops-rest-6.0
Define the body like this:
{
"query": "Term to search (e.g. UPN)",
"subjectKind": [ "User" ]
}
In the result you can find all information about the user that you would get from GET USER endpoint.
{
"count": 1,
"value": [
{
"subjectKind": "user",
"domain": "45aa3d2d-7442-473d-b4d3-3c670da9dd96",
"principalName": "[email protected]",
"mailAddress": "[email protected]",
"origin": "aad",
"originId": "55c8c7b6-7ace-43bc-918f-304dfa2b6317",
"displayName": "Jia-hao Tseng",
"_links": {
"self": {
"href": "https://vssps.dev.azure.com/Fabrikam/_apis/Graph/Users/aad.MDA0NzBlMzQtZGE2MS03YTY5LWJkOTYtNDg3YTg0OWVjNTU4"
},
"memberships": {
"href": "https://vssps.dev.azure.com/Fabrikam/_apis/Graph/Memberships/aad.MDA0NzBlMzQtZGE2MS03YTY5LWJkOTYtNDg3YTg0OWVjNTU4"
},
"membershipState": {
"href": "https://vssps.dev.azure.com/Fabrikam/_apis/Graph/MembershipStates/aad.MDA0NzBlMzQtZGE2MS03YTY5LWJkOTYtNDg3YTg0OWVjNTU4"
},
"storageKey": {
"href": "https://vssps.dev.azure.com/Fabrikam/_apis/Graph/StorageKeys/aad.MDA0NzBlMzQtZGE2MS03YTY5LWJkOTYtNDg3YTg0OWVjNTU4"
},
"avatar": {
"href": "https://dev.azure.com/Fabrikam/_apis/GraphProfile/MemberAvatars/aad.MDA0NzBlMzQtZGE2MS03YTY5LWJkOTYtNDg3YTg0OWVjNTU4"
}
},
"url": "https://vssps.dev.azure.com/Fabrikam/_apis/Graph/Users/aad.MDA0NzBlMzQtZGE2MS03YTY5LWJkOTYtNDg3YTg0OWVjNTU4",
"descriptor": "aad.MDA0NzBlMzQtZGE2MS03YTY5LWJkOTYtNDg3YTg0OWVjNTU4"
}
]
}