Dynamics365 OData string filtering

If we want to use simple filter in D365 OData endpoint, we’d use something like:

https://myinstance.dynamics.com/data/Workers?$filter=PersonnelNumber eq '123'

However, when we want to filter only the items which begin with a certain string, it is not possible in D365 to use the OData convention like ’startsWith’.

Luckily, the following wildcard (*) is possible:

https://myinstance.dynamics.com/data/Workers?$filter=LastName eq 'Smit*'

Or even the wildcard on both sides:

https://myinstance.dynamics.com/data/Workers?$filter=FirstName eq '*von*'

Hope this helps.