CloudRadial Support cannot provide help with specific custom filter strings. To fully utilize this feature, please be familiar with Microsoft Graph and read this article completely before implementing the custom filter option.
CloudRadial relies on the Microsoft Graph API to retrieve users from Microsoft 365. In some cases, you may only want to retrieve a very specific set of users in the tenant to sync with a particular CloudRadial company. This can occur when multiple companies in your PSA share a single 365 tenant and you need to retrieve just a subset of users to avoid duplicating users in the PSA. In these situations, you can specify a custom filter when retrieving users from Microsoft Graph that CloudRadial uses retrieving users.
Creating a Custom Filter
Working with custom filter queries requires knowledge of Microsoft Graph, which is beyond the scope of this document. Before using these filters, you should be familiar with:
We utilize the Beta API to allow access to more fields. The string you provide to CloudRadial will be passed to the $Filter parameter. No other parameters are allowed.
Entering a Custom Filter
Custom filters are set on a company-by-company basis. To do so:
- Log into your CloudRadial tenant
- Navigate to Partner > Clients
- Select a given company and Edit their settings
Under the Office 365 Synchronization settings, select the Custom Filtering option next to the Domains option (as seen in the screenshot below). If you specify a custom filter query, you won't be able to use the domains option, but you can filter by domains in the custom query.
Selecting the Custom Filtering option toggles the entry window where you can enter a string that will be passed to the Microsoft Graph query used to retrieve users from the tenant.
Here are some examples of filter strings that could be used to restrict users brought in for synchronization:
- departmentName eq 'sales'
- city eq 'dallas'
- postalCode eq '75206'
- endsWith(userPrincipalName, '@domain.com')
- (endsWith(userPrincipalName, '@domain.com')) and (departmentName eq 'sales')
- accountEnabled eq true
Please note: The Microsoft 365 'User' object does not reference group membership. For a full list of object parameters, please review user resource type - Microsoft Graph | Microsoft Learn.
If you enter a query with the wrong syntax, you receive the response of "Bad Request" in the status of the sync job. No other information is available to tell you what is wrong with the query. Use the Microsoft Graph Explorer above to test your query before entering the $Filter expression in CloudRadial.
If you enter a query with the correct syntax but incorrect options, such as asking for all users in a non-existent location, then all users could be removed from the company. Correcting or eliminating the filter string and resynching should recover users who were removed by the incorrect query.
Be careful working with the company in which you are a member, as you can end up accidentally removing your own user from the company and preventing you or anyone in your company from accessing CloudRadial to fix the issue.
If this happens, contact support by submitting a ticket and they can remove the filter and resync your contacts for you.