cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Anonymous
Not applicable

Error Handling for capturing Office 365 user Profile and adding a record into Excel

Hi,

We have an employee table that has over 1,000 records.  Many of the people no longer work here but we still need a list of them to be captured in our flow for historical reporting purposes.  My first action is called "When an item is modified in SQL Server" where I link to the employee table.  My next step is to get user profile (v2) where I capture the Office 365 id by linking it to the email address column in our employee table.  Since many people left 1-5 years ago, they have no office 365 email/id and the flow fails for them.  I get a status 404  error listed below.

{
"error": {
"code": "ResourceNotFound",
"message": "User not found",
 
The flow still captures all active employees but I would like to create some sort of error handling that will simply allow all past employees with no Office 365 id to be sent to my spreadsheet anyway.  I was looking at conditional logic but can't seem to figure this out.  Any thoughts?
Thanks,
CW
1 ACCEPTED SOLUTION

Accepted Solutions
Community Support
Community Support

Re: Error Handling for capturing Office 365 user Profile and adding a record into Excel

Hi @Anonymous ,

 

Do you want to collect information about employees who do not have an O365 email/id?

 

You could try to configure Add a row into a table action with Configure run after. "Add a row into a table" action is executed only when "Get user profile (v2)” action fails.

 

I use Button as a trigger on my side. You just replace the trigger on your side and configure the appropriate Dynamic content in Get user profile action.

Image reference:

14.PNG

Please take a try.

 

Best Regards,

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

1 REPLY 1
Community Support
Community Support

Re: Error Handling for capturing Office 365 user Profile and adding a record into Excel

Hi @Anonymous ,

 

Do you want to collect information about employees who do not have an O365 email/id?

 

You could try to configure Add a row into a table action with Configure run after. "Add a row into a table" action is executed only when "Get user profile (v2)” action fails.

 

I use Button as a trigger on my side. You just replace the trigger on your side and configure the appropriate Dynamic content in Get user profile action.

Image reference:

14.PNG

Please take a try.

 

Best Regards,

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

New Ranks and Rank Icons released on April 21!

The time has come: We are finally able to share more details on the brand-new ranks coming to the Power Automate Community!

firstImage

Now Live: 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!

sixthImage

Community Summit North America

The top training and networking event across the globe for Microsoft Business Applications

Top Solution Authors
Top Kudoed Authors
Users online (6,992)