cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
rachelspannuth
Frequent Visitor

Power Automate Approval - Assign using Variables

I'm having some issues with a Flow I built. It started as a simple approval Flow, routing to the submitter's manager for approval (which worked fine). Then, I was asked to change the Flow because the department lead wanted the approvals to go to her EA instead.

I'm trying to use Variables to track this, and keep getting this error whenever I test:
The request failed. Error code: 'GraphLookUpRequestFailedError'. Error Message: 'User lookup request to Graph failed lookup for user identifier: '{"@odata.context":"https://graph.microsoft.com/v1.0/$metadata#directoryObjects(aboutMe,accountEnabled,birthday,business...'.'.

 

Here is what I have for my flow - basically, if Sandy is the person's manager, it should Assign the Approval to Bryanne. Otherwise, it should default to the submitter's manager. 

 

Any tips would be greatly appreciated! 🙂

rachelspannuth_0-1621547813030.png

rachelspannuth_1-1621547846016.png

 

1 ACCEPTED SOLUTION

Accepted Solutions

I just took another look at your screenshot and noticed your approval is entitled "Start an Approval"  Unless you specifically renamed it to that you are using an outdated Approval action, probably from an old template.  The current action is called "Start and Wait for an Approval". Unless you renamed it remove that action and add the current version called Start and Wait for an Approval.  I suspect the use of the old deprecated action is why you are getting strange results.



-------------------------------------------------------------------------
If I have answered your question, please mark your post as Solved.
If you like my response, please give it a Thumbs Up.

View solution in original post

8 REPLIES 8
Pstork1
Dual Super User
Dual Super User

Can you show us from a sample run which action the error fails on?  Also, how are you assigning the value to the variable and the variable to the approval.  Those steps aren't here.



-------------------------------------------------------------------------
If I have answered your question, please mark your post as Solved.
If you like my response, please give it a Thumbs Up.
rachelspannuth
Frequent Visitor

apologies - it didn't copy my second image. Here's the flow again: 

Start of FlowStart of Flow

Flow ContinuedFlow Continued

And here is what happens when I try to run the flow:

 

Flow ErrorFlow Error

We can't see the email address that is actually being used in the run for privacy reasons.  Can you verify that it is just an email address and that the address points to an internal user on the Tenant?  The error message suggests that the user email can't be found in Azure Active Directory.



-------------------------------------------------------------------------
If I have answered your question, please mark your post as Solved.
If you like my response, please give it a Thumbs Up.

To confirm - it is showing the email address. When I copy/paste the email address from the Flow's Set Variable 2 output, it's connecting to a current user in the system.

 

Oddly, if I create the flow WITHOUT the variable or condition, I am able to use the Manager Email (same as I was using to set the varAssignedTo variable) to Assign the approval. 

Did you also check to make sure the email address in the variable is for an internal user?  Approvals won't work with anything other than internal users.



-------------------------------------------------------------------------
If I have answered your question, please mark your post as Solved.
If you like my response, please give it a Thumbs Up.

Yes, the email address is for an internal user. When I use the same Mail used to set the variable to directly assign, I get no errors. The error is only when I try to use the email address as a variable (created so approvals from the department head's direct reports are routed to their admin).

I just took another look at your screenshot and noticed your approval is entitled "Start an Approval"  Unless you specifically renamed it to that you are using an outdated Approval action, probably from an old template.  The current action is called "Start and Wait for an Approval". Unless you renamed it remove that action and add the current version called Start and Wait for an Approval.  I suspect the use of the old deprecated action is why you are getting strange results.



-------------------------------------------------------------------------
If I have answered your question, please mark your post as Solved.
If you like my response, please give it a Thumbs Up.

That did it - I replaced it with the Start and Wait for an Approval step, and it works fine now! Thanks! 🙂

Helpful resources

Announcements
Microsoft 365 Conference – December 6-8, 2022

Microsoft 365 Conference – December 6-8, 2022

Join us in Las Vegas to experience community, incredible learning opportunities, and connections that will help grow skills, know-how, and more.

Users online (1,416)