Skip to main content
Nintex Community Menu Bar
Solved

Office 365 Query User Profile Action guide

  • Sep 8, 2015 3:33 PM UTC
  • 10 replies
  • 168 views
  • Translate All

Forum|alt.badge.img+3

Has anyone successfully used the O365 Query User Profile Action with User Column in a SharePoint list and get proper data back?

 

I am trying to get the manager for a particular user assigned in the form. When passed in the User Email, it kept throwing an error .  When i dump the user data into the history it looked like i:0#.f|membership|firstname.lastname@trial.onmicrosoft.com. Is this an overlook by the Nintex team that the user column would contain claims?

 

So far I could only use it properly if I use the action with the Workflow Context for Initiator and Manager but can't be used for any other users.

 

Any ideas?

Best answer by andrewg

That still looks like the user's account login, not their email address. Did you use the Format This Value feature on the User Column to return just the email address? If not, it is returning the account login and will not be able to find the user.

More details here on Format this Value: Using the Format this Value Feature

View original

10 replies

Forum|alt.badge.img+17
  • Nintex Partner
  • Answer
  • Sep 8, 2015 8:30 PM UTC

That still looks like the user's account login, not their email address. Did you use the Format This Value feature on the User Column to return just the email address? If not, it is returning the account login and will not be able to find the user.

More details here on Format this Value: Using the Format this Value Feature

Translate

Forum|alt.badge.img+3
  • Author
  • Sep 9, 2015 12:52 AM UTC

Andrew , you are right on using the the format value. The placeholder values are very misleading as you can't see what you actually choose to show.

Translate

Forum|alt.badge.img+11
  • Scholar
  • Dec 1, 2015 1:49 AM UTC

But is there any way of getting the phone number or any other useful info in the profile?

Translate

Forum|alt.badge.img+17
  • Nintex Partner
  • Dec 1, 2015 2:45 AM UTC

Yes, in the Property setting you set with the name of the property you need back, such as Phone. http://help.nintex.com/en-US/O365/#O365WorkFlow/Workflow Actions - INT/Office 365 Query User Profile.htm

Translate

Forum|alt.badge.img+11
  • Scholar
  • Dec 1, 2015 2:52 AM UTC

But this needs a password. Users opening forms or running workflows have already been authenticated. They should already be able to look up info such as a phone number. Why should a password be necessary? Can I query the user profile without a password. If I setup my password and ID here, will I need to change it on the workflow everytime I reset my password... it would seem so...which would make this a real bother (when everytime my password is changed, workflows break). Is there a way around setting a password. I really do not want to ask our security folks to create a bespoke account for this. Like a SharePoint App Step, there should be a way of running it with publisher's permissions - Is there?

Translate

Forum|alt.badge.img+17
  • Nintex Partner
  • Dec 1, 2015 3:14 AM UTC

Forum|alt.badge.img+11
  • Scholar
  • Dec 1, 2015 3:30 AM UTC

Forum|alt.badge.img+9

https://tenant.sharepoint.com/_spi/SP.UserProfiles.PeopleManager/GetPropertiesFor(accountName=@v)?@v='i:0#.f|membership|daniel.westerdale@tenant.onmicrosoft.com'

I get a 404 error when I test against my actual tenant using Postman.  Note, I have run the interceptor to login into the tenant.

Anybody else attempted this?

Translate

Forum|alt.badge.img+9

As aside, looking at the (sparse) documentation, if I use the alternative Office 365 Query Profile Action, then I have a configure each one per property.  It works ok tho with what ever email format I have entered for the test user.

Translate

  • Aug 19, 2018 10:34 PM UTC

when passing the email id in the query user profile action, please truncate the extra chars prefixed with email id in person type column. Then it will get the required property.

To get the phone number, SharePoint person type column will be sufficient. No workflow is needed.

Translate