I want to run a Powershell script which provisions the remote exchange by running some commands. This can be achieved through an MPR, Set and workflow. The users created from MIM portal takes some time to sync to Azure AD and only after that we can provision mail box. So i want to create a SET of users who have been created 3 hours prior and also not before 12 hours.
Created a set with Advanced filter criteria but it fails.
<Filter xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" Dialect="http://schemas.microsoft.com/2006/11/XPathFilterDialect" xmlns="http://schemas.xmlsoap.org/ws/2004/09/enumeration">/Person[(CreatedTime > op:subtract-dayTimeDuration-from-dateTime(fn:current-dateTime(), xs:dayTimeDuration('PT3H'))) and (CreatedTime < op:add-dayTimeDuration-to-dateTime(fn:current-dateTime(), xs:dayTimeDuration('PT12H')))]</Filter>
This works fine in a search scope but fails in SET advanced filter. Can anyone help in this regards or a way to find a better solution to provision exchange mailbox only after the user has synched to Azure as it sometimes take the user to sync to azure