cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

What are the possible reasons for failing to retrieve User Profile using theO365 Query User Profile action?

Jump to solution

Hi,

I am using the Nintex Workflow Action: O365 Query User Profile in order to query user profile information: http://help.nintex.com/en-US/O365/Default.htm#O365WorkFlow/Workflow Actions - INT/Office 365 Query User Profile.htm%3FTocPath%3DNintex%2520Workflow%2520for%2520Office%2520365%7CActions%7COffice%2520365%2520workflow%2520actions%7C_____20

However, I get the following error Workflow Error:

However, I am sure that that email address is correct.

I have also requested User Profile information for the Username that is used to initiate this workflow, and get the same error.

Maybe there is something I have missed? Maybe there is an app permissions issue that is causing this issue?

Any help/comments would be appreciated,

Duane

Labels: (1)
0 Kudos
Reply
12 Replies
andrewg
Nintex Newbie

Re: What are the possible reasons for failing to retrieve User Profile using theO365 Query User Profile action?

Jump to solution

What user are you using to do the Query? What level of permissions does it have? Can you get any success response from any user? Such as your own?

Reply
Not applicable

Re: What are the possible reasons for failing to retrieve User Profile using theO365 Query User Profile action?

Jump to solution

Hi Andrew Glasser​,

Thankyou for your response.

I'm using the O365 Query User Profile Action with the following configuration:

The Email Address is derived from the username.

The workflow message is now as follows:

I am using the NintexWoflowProcess credentials on other workflows within this site collection without issues.

The original error posted was using my personal credentials/email address. Both myself and NintexWorkflowProcess have full control permissions.

0 Kudos
Reply
andrewg
Nintex Newbie

Re: What are the possible reasons for failing to retrieve User Profile using theO365 Query User Profile action?

Jump to solution

So it is looking up the strUserPorfile variable in the user profile. Since the strUserProfile variable's value is nintexworkflowprocess, that could be why you are not getting the results you need. Can the strUserProfile value be changed to another user?

Reply
Not applicable

Re: What are the possible reasons for failing to retrieve User Profile using theO365 Query User Profile action?

Jump to solution

The values of strUserProfile were (email addresses), not plain usernames eg. nintexworkflowprocess:

NintexWorkflowProcess@spar.co.za

Initially I had tested with my own user account (email address): SpeirsT@SPARZA.onmicrosoft.com

I have also tried one other username. eachtime the error Description is "email address' does not exist and user profile cannot be found. However, I am able to successfully send emails to the address that I'm told does not exist and for which the user profile cannot be found. I don't understand how the user prforfle for a particular email address cannot be found even though the email account is valide - i.e. I am able to email the account and even browse to that users My Site profile.

Please continue the discussion

0 Kudos
Reply
Highlighted
andrewg
Nintex Newbie

Re: What are the possible reasons for failing to retrieve User Profile using theO365 Query User Profile action?

Jump to solution

Try using REST, does it give you anything?

http:// siteurl/_api/SP.UserProfiles.PeopleManager/GetUserProfilePropertyFor(accountName=@v,propertyName='LastName')?@v='i:0%23.f|membership|username@siteurl.onmicrosoft.com'

notife the siteurl's and no space in the url

Reply
Not applicable

Re: What are the possible reasons for failing to retrieve User Profile using theO365 Query User Profile action?

Jump to solution

I have the same issue when I try to get the user profile of the initiator of the workflow.

It seems it does not work when the email is external and not a .onmicrosoft.com is that true?

0 Kudos
Reply
andrewg
Nintex Newbie

Re: What are the possible reasons for failing to retrieve User Profile using theO365 Query User Profile action?

Jump to solution

It will be able to get data on users within the tenant. So that doesn't mean it has to be an onmicrosoft  account if DirSync or ADFS is involved.

But do you mean the initiator is an external user (to the tenant)?

0 Kudos
Reply
Not applicable

Re: What are the possible reasons for failing to retrieve User Profile using theO365 Query User Profile action?

Jump to solution

The initiator has an account with a profile, the account name is like i:0#.f|membership|john.smith_mycompany.com#ext#@mycompany.onmicrosoft.com, so it means he's within the tenant right?

0 Kudos
Reply
andrewg
Nintex Newbie

Re: What are the possible reasons for failing to retrieve User Profile using theO365 Query User Profile action?

Jump to solution

Cool, I haven't seen a username or email with #ext# in it before. I'm not sure what that is. But yes, mycompany.onmicrosoft.com means it should be a user in your tenant, and you are not using DirSync with a local domain.

0 Kudos
Reply