Created
May 10, 2016 07:56
-
-
Save IAMIronmanSam/23b4e88acbdb1a6d87b35c79c8a6bdf2 to your computer and use it in GitHub Desktop.
Get complete user profile data by user email
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
| function getUserInfo(alias){ | |
| $.ajax({ | |
| url: "/sites/_api/sp.userprofiles.peoplemanager/GetPropertiesFor(@v)?@v='"+encodeURIComponent('i:0#.f|membership|'+alias)+"'", | |
| type: "GET", | |
| headers: { "Accept": "application/json;odata=verbose" }, | |
| success: function(data) { | |
| var dataResults = data.d; | |
| debugger; | |
| }, | |
| error: function (err) { | |
| console.error(JSON.parse(err.responseText).error.message.value); | |
| } | |
| }); | |
| } | |
| getUserInfo('arivu@xyz.com'); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment