Last active
July 7, 2023 13:58
-
-
Save ktskumar/e36cbca58ce9d539f7f2660f8a30a9e4 to your computer and use it in GitHub Desktop.
Retrieve the Current User information from SharePoint
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//getRequest method reference | |
//https://gist.github.com/ktskumar/a9e9df497673e9fd26ead8532b9ff425 | |
//Returns the current user information | |
getRequest("https://domain.sharepoint.com/sites/name/_api/web/currentuser").then(function(output){ | |
console.log(JSON.parse(output.response)); | |
}); | |
//Returned Properties | |
//Email, Expiration, Id, IsEmailAuthenticatonGuestUser, IsHiddenInUI, IsShareByEmailGuestUser, IsSiteAdmin, LoginName, | |
//PrincipalType, Title, UserId, UserPrincipalName |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment