cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
New Member

Can't connect to SPO custom user profile property via HTTP Request

I'm trying to connect to the SPO user profile properties to retrieve a custom property via the "Send an HTTP request to SharePoint" connector.

The request is:

/_api/SP.UserProfiles.PeopleManager/GetPropertiesFor(accountName=@v)?%40v='{Employee Claims}'
where the dynamic content "Employee Claims" displays i:0#.f|membership|user@domain.com to populate the accountName,
however the flow continues to fail with the error, "The query string "accountName" is missing or invalid."
I've tried '@', '%40' and still no luck. What am I doing wrong?
 
If there is another way to successfully get the SPO user custom profile properties (not Office 365), your help is greatly appreciated.
I need this information for the conversion of multiple SPD workflows to Power Automate.
1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted
Community Support
Community Support

Re: Can't connect to SPO custom user profile property via HTTP Request

Hi @spela3,

 

You can try this uri:

/_api/SP.UserProfiles.PeopleManager/GetPropertiesFor(accountName=@v)?@v='i:0%23.f|membership|xx@siteurl.onmicrosoft.com'

 

Screenshot 2020-09-16 163940.jpg

Run result:Screenshot 2020-09-16 163905.jpg

 

Best Regards,
Community Support Team _ Lin Tu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

 

View solution in original post

4 REPLIES 4
Highlighted
Community Support
Community Support

Re: Can't connect to SPO custom user profile property via HTTP Request

Hi @spela3,

 

You can try this uri:

/_api/SP.UserProfiles.PeopleManager/GetPropertiesFor(accountName=@v)?@v='i:0%23.f|membership|xx@siteurl.onmicrosoft.com'

 

Screenshot 2020-09-16 163940.jpg

Run result:Screenshot 2020-09-16 163905.jpg

 

Best Regards,
Community Support Team _ Lin Tu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

 

View solution in original post

Highlighted
New Member

Re: Can't connect to SPO custom user profile property via HTTP Request

Thank you @v-litu-msft!

I escaped the '#' and the '@' and used "Employee Email" instead of "Employee Claims" and it ran successfully! 

However, I'm getting a null output.  Any ideas as to why?

 

spela3_1-1600263195074.png

spela3_2-1600264715214.png

 

 

Highlighted
New Member

Re: Can't connect to SPO custom user profile property via HTTP Request

Ok, I was able to get an output of the properties with this formatted request.  Everything works now. 🙂

spela3_0-1600281135872.png

I also had to escape the ':' and '|' so that the format was "@v='i%3A0%23.f%7Cmembership%7C<accountName>".

I don't know if the headers were necessary, but I threw them in just in case.

Highlighted
Community Support
Community Support

Re: Can't connect to SPO custom user profile property via HTTP Request

Hi @spela3,

 

There is no need to add the headers.

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

 

Best Regards,
Community Support Team _ Lin Tu

Helpful resources

Announcements
Power Platform ISV Studio

Power Platform ISV Studio

ISV Studio is designed to become the go-to Power Platform destination for ISV’s to monitor & manage published applications.

Upcoming Events

Experience what’s next for Power Automate

See the latest Power Automate innovations, updates, and demos from the Microsoft Business Applications Launch Event.

Community Conference

Power Platform Community Conference

Find your favorite faces from the community presenting at the Power Platform Community Conference!

Top Kudoed Authors
Users online (7,718)