cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
JP63
Regular Visitor

Issues getting UPN using Get User Profile v2

Hi all, 

 

I have run into an issue that I can't seem to resolve/find resolution to. I've tried a number of different recommendations including ensuring the library has all read except external users. so here we go...

 

Trying to set up a flow using SharePoint, O365User, and Planner in a Teams tab. The goal is:

-When a new doc is added to a library (in this case the Team's channel files tab library) the flow will run

-The assigned reviewer in the SP list is pulled from a custom column that pulls their email

-GetUserProfile(v2) is supposed to use the email to retreive their user info

-Planner takes the output of GetUserProfile(v2) to populate the UPN for the assigned user and creates the review task in planner

 

Just using the assignee's email in planner doesn't work, it wants a UPN. If I go into Delve and grab my ID and plug that in directly--the flow runs fine and assigns to me, so I know that's the value Planner wants. However--every time I try to run the flow I get a 403 or a 404.  I was getting 403s until I added all read except external to the SP list. 403 went away, but now I'm getting a 404 stating the resource couldn't be found.

 

Has anyone else had similar issues/found any way around this? I see plenty of posts where people are using GetUserProfile(v2) so I'm assuming the issue is on my end.


Thanks in advance,

-JP

 

 

5 REPLIES 5
v-zhos-msft
Solution Sage
Solution Sage

Hi JP63,

According to your description, what confused you is the assignee's email in planner doesn't work, it wants a UPN.

Could you please share a screenshot of the configuration of your flow? So I could get more details of the issue.

 

Here are some similar cases, which may help you I think.

https://powerusers.microsoft.com/t5/General-Flow-Discussion/On-new-SharePoint-items-create-Planner-t...

https://powerusers.microsoft.com/t5/General-Flow-Discussion/Create-planner-event-and-assign-user-ID/...

 

To test this issue, I create a flow with the same configuration and don't have the issue that you mentioned.

1.png2.png

Please feel free post back if you need more help.

Best regards,

Zhonys

Hi Zhonys,

 

Thanks for the re:.  As far as the UPN--I understand planner wants that and not an email, as per above--when i do a separate test where I include what I assume is my UPN from Delve instead of using the GetUserProfilev2 it will run without fail. What I want to do is take the email from the custom SP column for assigned to, use it to call the user profile, and then trying to pass that recovered UPN value for Planner. The problem comes in when the GetUserProfilev2 step tries to run.  Here's the flow I'm trying to run and the result. In this case--i created the item and assigned to myself, so I'm not sure why it would come back as 'resource not found'?

 

SP-Planner Flow Redac.jpg SP-Planner Flow 404.jpg

bsafron
New Member

 

Hi JP63,

Does the assigned to column  you created in the same library where you create the new file. As shown below:1.PNG

I suggest you to change the trigger to when a file is created or modified for a try.

 

Please feel free post back if you need more help.

Best regards,

Zhonys

It did not. I've tried it both ways, same result. I've also tried it by using a different piece of information from the SP list to pull the User Profile. It seems like the problem comes when the Flow tries to call the service to GetUserProfile...that's where it always breaks down.  Is it conceivable that there's something (permission or otherwise) preventing that service from being leveraged?

Helpful resources

Announcements
MPA Virtual Workshop Carousel 768x460.png

Register for a Free Workshop

Learn to digitize and optimize business processes and connect all your applications to share data in real time.

Power automate tips 768x460 v2.png

Restore a Deleted Flow

Did you know that you could restore a deleted flow? Check out this helpful article.

Microsoft Build 768x460.png

Microsoft Build is May 24-26. Have you registered yet?

Come together to explore latest innovations in code and application development—and gain insights from experts from around the world.

May UG Leader Call Carousel 768x460.png

What difference can a User Group make for you?

At the monthly call, connect with other leaders and find out how community makes your experience even better.

Top Solution Authors
Top Kudoed Authors
Users online (2,244)