Deprov - Sleep

Guys. 

I have a need for my deprovision policy to pause for 45 minutes. Let me give you some background so that it might help. maybe you have a better way of handling this?

We have onPrem AD and we synchronise our users up to Azure AD via the Azure AD connect application. 

I have a AR dynamic group that puts a user account in to a security group. This security group is then part of a Azure license. Just as an example Dynamic GroupA gives members access to MS Teams. 

Now what I need to happen during the deprov process is that it removes the user account from all security groups which it does. I then need it to wait 45 minutes until the Azure AD connect sync runs. This will then remove Azure user from the groups and give the license back to the pool. 

After 45 mins continue with the rest of the deprov process. 

Basically if we simply deprov and disable the account and the Azure Sync runs then the account is moved in to the Azure recycle bin for 30 days with all license still assigned. I see this post but i am unable to comment if a solution was found. 

 Pause/Wait in a script during deprovision? 

Thanks in advance for any suggestions. 

Parents Reply
  • I do have another question and what your thoughts are.  

    So lets say user account VA is set to true and it shows up in the managed unit at 10:55AM but the scheduled task is set to run once an hour. That only leaves 5 mins and not enough time for Azure syncs to run etc. Is there a way handling this so that it only executes on accounts that have been in the managed unit for at least 40 mins already? another VA with a time stamp maybe? I 

Children