At this time this is not something that we can do out of the box. I am trying to think of a way to perhaps query AD for the user then if that returns a null value, auto-assign it to someone else as a default and have them delegate.
Again, its a stretch but I'll update this if I find out anything else.
--- UPDATE ---
Okay so I tested this theory and it worked pretty easily. Shows what happens when you test something out I guess.
What I did was use the Azure AD Get user details action and got the property on if the account was enabled. This was helpful because it will be either true or false.
To make this work you could create an email collection for all the users you want to check and the loop through the collection checking. If any user equals false, then either remove them from the collection or do something for those users. There is a ton more, but this is one way to figure out if a user is good or not before sending an email or assigning a task.
Wow! That's awesome. Except our tenant admin won't give us access to Azure... I tried earlier to query the SharePoint profile but there was nothing in the profile that indicated if the account had been disabled or was valid. Well, at least this might help somebody out there!
@jacquenv Okay so that sucks, except there may be a way around it .
Here are two way this can happen:
- Your admin can create the connection for the Azure AD action and just allow you to use it in the workflow. Probably not gonna happen as I think about it, but that is an option.
- The other thought is to have your admin create a component workflow with the Azure connection in it. This would mean you cannot touch AD directly, but you could have it be a workflow that just gets called and passes information back to your workflows.
Let me know if that helps.