cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
Crack_Jack
Nintex Newbie

How to get current user information using REST

Jump to solution

Hi

I am trying to get some information pre populate in the new form for which I need to have current user and their Manager information. I am not using the OOTB functions as they will not give me the manager' s info. 

Any idea how can I get Current User's and their Manager's using REST service or any method for nintex forms.

Labels: (1)
0 Kudos
Reply
4 Replies
Automation Master
Automation Master

Re: How to get current user information using REST

Jump to solution

where do you want to get the info from? from sharepoint? or AD?

if OOTB functions do not provide needed details it looks like you do not have populated them in AD and so neither SP can get them. in that case REST call will not help you either.

 

 

 

anyway, SP's REST endpoints looks like

<siteURL>/_api/web/getuserbyid(1)

<siteURL>/_api/web/siteUsers

 

https://docs.microsoft.com/en-us/previous-versions/office/developer/sharepoint-rest-reference/dn5314...

 

0 Kudos
Reply
Crack_Jack
Nintex Newbie

Re: How to get current user information using REST

Jump to solution

These calls give us the current user info and doesn't contain any info about their managers,phone no etc which is present in the AD. 

Solved it after putting some hours and its like

"/_api/SP.UserProfiles.PeopleManager/GetPropertiesFor(@v)?@v='" + encodeURIComponent(LoginName)"

will give us the whole info. and the problem was Nintex having the permission at the site level but not the tenant level and was throwing 403 error everytime I was running the above command.

0 Kudos
Reply
kelliganp
Nintex Newbie

Re: How to get current user information using REST

Jump to solution

Hi @Crack_Jack ,

 

I am trying to accomplish something like what you seemed to have done in the conclusion of the is post. I am hoping you can shed some light on how you got to the data for @gbone02 and I.

 

Thanks!

Patrick

0 Kudos
Reply
Crack_Jack
Nintex Newbie

Re: How to get current user information using REST

Jump to solution
How much or upto what level you have done/tried because then I will explain from there.
0 Kudos
Reply