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

how can we check whether the 0365 user is a valid user account. if user has left the company.

I did with 

Get User profileimage.png

Check account but no success.

 

 

2 ACCEPTED SOLUTIONS

Accepted Solutions
Highlighted
Super User III
Super User III

Re: how can we check whether the 0365 user is a valid user account. if user has left the company.

You will probably want to use the "Configure Run After feature" which allows you do do error handling.  I don't believe that there is an "out of the box" method to check for a valid user.

 

The configure run after will allow you to take execute one action if the Get User Profile action is successful and another if it fails.  If you can provide a larger view of you Flow, I can make some suggestions.

 

Here is an example of the Configure Run After screen

 

RunAfter.jpg

 

RunAfter2.jpg

 

Scott

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

Scott

View solution in original post

Highlighted
Community Support
Community Support

Re: how can we check whether the 0365 user is a valid user account. if user has left the company.

Hi @shalini,

 

Could you please share a full screenshot of your flow's configuration?

Could you please show more details about your Condition box?

 

The error message told that there is something wrong with the Condition box within your flow. If you want to check if an Office 365 user is a valid user account, you could consider take a try with the following workaround:

  • Add a proper trigger, here I use the Flow Button trigger.
  • Add a "Get user profile (V2)" action, User (UPN) field set to the email address of the Office 365 user that you want to check.
  • Add a Parallel branch action, within left branch, add a "Send an email notification" action (Rename it as "Valid User Account Notification"). 

         Within right branch, add a "Send an email notification 2" action (Rename it as "Invalid Account Notification"). Click "Menu" button of this action, then select the "Configure run after" option:16.JPG

Within the "Invalid Account Notification" should run after panel, select the "has failed" option, then click "Done" button:17.JPG

 

Image reference:18.JPG

 

 

When the Office 365 user is a valid user account, the flow works successfully as below:20.JPG

When the Office 365 user is a invalid user account, the flow works successfully as below:19.JPG

 

 

More details about the Parallel branch action, please check the following article:

https://flow.microsoft.com/en-us/blog/parallel-actions/

 

More details about how to configure the "Configure run after" option, please check the following article:

https://flow.microsoft.com/en-us/blog/error-handling/

 

 

Best regards,

Kris

Community Support Team _ Kris Dai
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

2 REPLIES 2
Highlighted
Super User III
Super User III

Re: how can we check whether the 0365 user is a valid user account. if user has left the company.

You will probably want to use the "Configure Run After feature" which allows you do do error handling.  I don't believe that there is an "out of the box" method to check for a valid user.

 

The configure run after will allow you to take execute one action if the Get User Profile action is successful and another if it fails.  If you can provide a larger view of you Flow, I can make some suggestions.

 

Here is an example of the Configure Run After screen

 

RunAfter.jpg

 

RunAfter2.jpg

 

Scott

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

Scott

View solution in original post

Highlighted
Community Support
Community Support

Re: how can we check whether the 0365 user is a valid user account. if user has left the company.

Hi @shalini,

 

Could you please share a full screenshot of your flow's configuration?

Could you please show more details about your Condition box?

 

The error message told that there is something wrong with the Condition box within your flow. If you want to check if an Office 365 user is a valid user account, you could consider take a try with the following workaround:

  • Add a proper trigger, here I use the Flow Button trigger.
  • Add a "Get user profile (V2)" action, User (UPN) field set to the email address of the Office 365 user that you want to check.
  • Add a Parallel branch action, within left branch, add a "Send an email notification" action (Rename it as "Valid User Account Notification"). 

         Within right branch, add a "Send an email notification 2" action (Rename it as "Invalid Account Notification"). Click "Menu" button of this action, then select the "Configure run after" option:16.JPG

Within the "Invalid Account Notification" should run after panel, select the "has failed" option, then click "Done" button:17.JPG

 

Image reference:18.JPG

 

 

When the Office 365 user is a valid user account, the flow works successfully as below:20.JPG

When the Office 365 user is a invalid user account, the flow works successfully as below:19.JPG

 

 

More details about the Parallel branch action, please check the following article:

https://flow.microsoft.com/en-us/blog/parallel-actions/

 

More details about how to configure the "Configure run after" option, please check the following article:

https://flow.microsoft.com/en-us/blog/error-handling/

 

 

Best regards,

Kris

Community Support Team _ Kris Dai
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

Helpful resources

Announcements
firstImage

Super User Program Update

Three Super User rank tiers have been launched!

firstImage

Power Platform 2020 release wave 2 plan

Features releasing from October 2020 through March 2021

firstImage

Join the new Power Virtual Agents Community!

We are excited to announce the launch of Power Virtual Agents Community. Check it out now!

firstImage

New & Improved Power Automate Community Cookbook

We've updated and improved the layout and uploading format of the Power Automate Cookbook!

thirdimage

Power Automate Community User Group Member Badge

Fill out a quick form to claim your user group badge now!

Users online (7,277)