I want to create a user in UserInformationList using the email (retrieved from GET /users/{id | userPrincipalName}).
I need to create a new item in SharePoint using a Logic App. I'm using the HTTP connector and an authentication token obtained from a POST
request to https://login.microsoftonline.com/tenant/oauth2/v2.0/token
.
In my SharePoint list, some columns are of type Person or Group, which require a Lookup ID. I know that the following endpoint retrieves the Lookup ID from the User Information List for existing users:
GET https://graph.microsoft.com/v1.0/sites/{site-id}/lists/{list-id}/items?$select=Fields&$filter=Fields/EMail eq '******@gmail.com'&$expand=Fields
However, for users who are not yet in the User Information List, I need a way to add them and retrieve their Lookup ID automatically. I did research and get the EnsureUser REST API, but there is no where about the authentications. How can I use the REST APIs in the HTTP Connector?