Meerfall the dewott
Meerfall the dewott

Reputation: 219

Microsoft Graph V1 Getting Member using list lookup field

I have a lookup field in a SharePoint list that offers the (lookup) id for a user that exists within Microsoft. The id is something similar to 100. I want to be able to use that id through Microsoft Graph to retrieve the associated member.

I have no idea how SharePoint uses that id to find the user.

"fields": {
   "User1LookupId": "138"
}

Upvotes: 0

Views: 719

Answers (1)

Paul Schaeflein
Paul Schaeflein

Reputation: 627

The id used in lookup fields is from the SharePoint user list. The SharePoint user list is not in Microsoft Graph, rather you need to use the SharePoint REST API to get the user information:

https://contoso.sharepoint.com/sites/sitename/_api/web/GetUserById(lookupId)

This call should return the UPN, which you can use to get the Microsoft Graph User (if needed).

https://learn.microsoft.com/en-us/previous-versions/office/developer/sharepoint-rest-reference/dn531432(v=office.15)?redirectedfrom=MSDN#user-resource

Upvotes: 2

Related Questions