I have a flow that checks if a future, current or passed employee has an O365 account. Normally accounts are blocked when an employee leaves the company and deleted after 90 days. We want a sharepoint list that doublechecks.
- Once a day the flow is triggered
- We 'get items' from a sharepoint list of all employees
- We use ‘get user profile (v2)’ in a loop to get every employees O365 profile
- If they have a profile -> the user has an account, we check if it’s enabled or disabled and write this to our sharepoint list
If they don’t have a profile -> ‘get user profile (V2) fails. We’ve set a ‘run after fail’ and write ‘no account’ to our sharepoint list.
Except, when ‘get user profile(V2)’ fails power automate considers the entire flow a failure, even though a run after fail is set. After a while it turns the flow off automatically because it keeps failing.
I can’t use a terminate action, because my loop still needs to cycle through all the other employees.