Reputation: 15
Currently I am trying to get the lookupId for a user's SharePoint my-site using SharePoint RestAPI. My http request url looks like this, but I keep getting a 401 or 404 error.
https://<tenant-name>-my.sharepoint.com/personal/<user-name>_<tenant-name>_com/_api/web/siteusers?$select=Id,LoginName,Title,Email,UserPrincipalName&$filter=Title eq <user-name>
What is the problem here?
My current RestAPI scopes are ["https://<tenant-name>.sharepoint.com/AllSites.Write", "https://<tenant-name>.sharepoint.com/MyFiles.Write"]
Upvotes: 0
Views: 26