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

Flow Failed to get user from Azure AD for guest user

Hello, 

 

I have a flow working fine before to get user details from Azure AD for guest user (outlook.com). Yesterday, suddenly all the flow failed with error as per attached. This flow is used for my company leave application. for staff using outlook email was failed to apply leave. All staff started to find me regarding this issue. I never edit the flow before, dont know why Smiley Sad

 

Here is the flow to ID from Azure AD

 

Untitled.png

 

and when guest user (outlook email) apply leave, the error become this,

 

screenshot-asia.flow.microsoft.com-2019.07.04-09-52-51.png

1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted
Community Support
Community Support

Re: Flow Failed to get user from Azure AD for guest user

Hi @ladyana2288 ,

 

Thanks for providing the detailed info.

 

Instead of using dynamic content Created By Claims, please try to use dynamic content Created By Email directly in the User Id or Principal field,

 

Created By Email will return the user’s exact email address, there is no need to use a function to get the email address from claims.

1.PNG

 

 

Best regards,

Mabel          

 

Community Support Team _ Mabel Mao
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

6 REPLIES 6
Highlighted
Community Support
Community Support

Re: Flow Failed to get user from Azure AD for guest user

Hi @ladyana2288 ,

 

Which trigger are you using? Could you share a whole screen on your flow?

 

What’s the function used in Get user action? Please make sure the replace function will return a valid User Id or Principle name.

 

I will reproduce this issue with more details.

 

Best regards,

Mabel          

 

 

Community Support Team _ Mabel Mao
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Highlighted
Frequent Visitor

Re: Flow Failed to get user from Azure AD for guest user

Thank you for reply @v-yamao-msft 


I use Get User in Azure AD, this trigger to get Object Id in Azure AD to match Object ID with Get items in sharepoint list. My company got staff use company email and outlook email, we use Azure AD to invite guest user(outlook.com). Before this, the flow run smooth for both email, but now staff using outlook email got failed flow.

 

Here is the whole flow, for Get User - expression code is 

replace(triggerBody()?['Author']?['Claims'], 'i:0#.f|membership|', '')

 

screenshot-asia.flow.microsoft.com-2019.07.05-11-18-31.png

 

the error flow become like this

 

screenshot-asia.flow.microsoft.com-2019.07.05-11-20-20.png

Highlighted
Community Support
Community Support

Re: Flow Failed to get user from Azure AD for guest user

Hi @ladyana2288 ,

 

Thanks for providing the detailed info.

 

Instead of using dynamic content Created By Claims, please try to use dynamic content Created By Email directly in the User Id or Principal field,

 

Created By Email will return the user’s exact email address, there is no need to use a function to get the email address from claims.

1.PNG

 

 

Best regards,

Mabel          

 

Community Support Team _ Mabel Mao
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
Frequent Visitor

Re: Flow Failed to get user from Azure AD for guest user

Thanks  @v-yamao-msft 

 

but I already try but it did not work for me, it show the error like this 

 

{
"error": {
"code": "Request_ResourceNotFound",
"message": "Resource 'XXXXXXXXXXX@outlook.com' does not exist or one of its queried reference-property objects are not present.",
"innerError": {
"request-id": "d816810c-613e-4501-9e10-686359047e3f",
"date": "2019-07-05T08:25:08"
}
}
}
Highlighted
Community Support
Community Support

Re: Flow Failed to get user from Azure AD for guest user

Hi @ladyana2288 ,

 

The issue could be reproduced by me.

 

I am afraid that Azure AD actions don’t support Guest user, please feel free submit a request on Flow Ideas Forum:

https://powerusers.microsoft.com/t5/Flow-Ideas/idb-p/FlowIdeas

 

Best regards,

Mabel  

 

Community Support Team _ Mabel Mao
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Highlighted
Frequent Visitor

Re: Flow Failed to get user from Azure AD for guest user

Hi @v-yamao-msft ,

 

I try the other way, remove get user from Azure AD, and use email address to get user information. My flow now running smoothly. 

 

But i still confius why before this no issue to get user from Azure AD, suddenly it doesn't support guest user anymore.

 

Thank you so much.

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 Solution Authors
Top Kudoed Authors
Users online (4,875)