A tenant can have multiple assigned domains and all users are directly organized within a tenant. To get a list of all users you could simply ask:

```
https://graph.microsoft.com/v1.0/users

```

But I'd like to filter the list by the used domain within the user principal name. After reading the [explanation at MSDN](https://msdn.microsoft.com/en-us/library/azure/ad/graph/howto/azure-ad-graph-api-supported-queries-filters-and-paging-options) and the [developer documentation](https://developer.microsoft.com/en-us/graph/docs/concepts/query_parameters) it seems that it is not possible to do something like this.

You can only check for (not) equality or if a string starts with some text, but it is not possible to check if a string ends with something specific.

I wish there would exists something like, but neither is:

```
https://graph.microsoft.com/v1.0/users?$filter=endsWith(userPrincipalName, 'mydomain.com')
https://graph.microsoft.com/v1.0/users?$filter=userPrincipalName eq '*@mydomain.com'
https://graph.microsoft.com/v1.0/users?$filter=userPrincipalName eq '.*@mydomain.com$'
https://graph.microsoft.com/v1.0/users?$filter=domain eq 'mydomain.com'

```

Does anyone have an idea on how to filter the list of users for a specific domain?