Forum Discussion
Adaptive Scope Sytntax
Your logic is correct in principle, but Adaptive Scope queries use KQL-based syntax (similar to Microsoft 365 compliance filters), not the traditional Exchange PowerShell OPATH syntax.
For Adaptive Scopes targeting Exchange locations, you should use the property that represents mailbox type as exposed to Microsoft Purview, not necessarily the exact RecipientTypeDetails filter used in Exchange PowerShell.
For scoping only user mailboxes and excluding shared mailboxes, the recommended query is:
RecipientTypeDetails -eq "UserMailbox"
However, this works only if the Adaptive Scope supports that property in your tenant. In most modern tenants, RecipientTypeDetails is supported for Exchange adaptive scopes.
To validate, you can test the filter in the Purview portal under Adaptive Scope preview results and confirm that only UserMailbox objects are returned.
Important clarification:
- UserMailbox → standard user mailbox
- SharedMailbox → shared mailbox
- RoomMailbox / EquipmentMailbox → resource mailboxes
Your filter will exclude SharedMailbox automatically if it is strictly:
RecipientTypeDetails -eq "UserMailbox"
If you want to be explicit and defensive, you can also use:
RecipientTypeDetails -ne "SharedMailbox"
But this is less precise, because it would still include other mailbox types such as RoomMailbox.
Best practice for retention separation:
- Create Adaptive Scope for UserMailbox only
- Create a separate retention policy for SharedMailbox (if needed)
- Ensure no overlap between scopes
One additional recommendation:
After creating the Adaptive Scope, verify the scope membership using the preview option before publishing the retention policy. Adaptive scopes are dynamic, but changes may take time to evaluate.
In summary:
Your syntax is correct for targeting only user mailboxes, assuming RecipientTypeDetails is available in your tenant’s Adaptive Scope properties.