Is there a way to get a users PrincipalId based on their email address. I'm looking to share/apply permissions to files and folders in a users OneDrive to Business drive using the REST API.

1 Answer 1


SP.UserCollection object contains the SP.UserCollection.getByEmail Method to get the user with the specified email address. The following example demonstrates how to get SP.User Id property:

/_api/web/SiteUsers/getByEmail('[email protected]')/Id

Alternatively you could utilize the following query:

/_api/web/SiteUsers?$select=id&$filter=Email eq '[email protected]'

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.