I've been trying to add filters to my Search Resource Availability api call following this page: [Search resource availability API][1]
No matter what I do I can't seem to filter by Organizational Unit.
Here's my http call body:
```json
{
"Version": "3",
"IsWebApi": true,
"Requirement": {
"msdyn_fromdate": "2021-11-01T00:00:00Z",
"msdyn_todate": "2021-11-30T23:59:00Z",
"msdyn_remainingduration": 60,
"msdyn_duration": 60,
"@odata.type": "Microsoft.Dynamics.CRM.msdyn_resourcerequirement"
},
"Settings": {
"ConsiderSlotsWithProposedBookings": false,
"MovePastStartDateToCurrentDate": true,
"@odata.type": "Microsoft.Dynamics.CRM.expando"
},
"ResourceSpecification":{
"@odata.type": "Microsoft.Dynamics.CRM.expando",
"ResourceTypes@odata.type": "Collection(Microsoft.Dynamics.CRM.expando)",
"ResourceTypes": [
{
"@odata.type": "Microsoft.Dynamics.CRM.expando",
"value": "3"
}
],
"Constraints": {
"@odata.type": "Microsoft.Dynamics.CRM.expando",
"OrganizationalUnits@odata.type": "Collection(Microsoft.Dynamics.CRM.expando)",
"OrganizationalUnits":[
{
"@odata.type": "Microsoft.Dynamics.CRM.expando",
"value": "b2054232-a114-ec11-b6e7-000d3a842ab8"
}
]
}
}
}
```
And here's the response I get:
```json
{
"@odata.context": "">orga215da53.api.crm3.dynamics.com/.../$metadata
"TimeSlots": [],
"Resources": [],
"Related": {
"@odata.type": "#Microsoft.Dynamics.CRM.expando",
"TimeSlots@odata.type": "#Collection(Microsoft.Dynamics.CRM.crmbaseentity)",
"TimeSlots": [],
"Resources@odata.type": "#Collection(Microsoft.Dynamics.CRM.crmbaseentity)",
"Resources": []
},
"Exceptions": {
"@odata.type": "#Microsoft.Dynamics.CRM.expando"
}
}
```
But i KNOW that that organization unit exists in CRM.
I tried changing the odata.type to the actual Organization Unit CRM type (`msdyn_organizationalunit`) but that just gives me an error (`An error occurred while validating input parameters: System.ArgumentNullException: Value cannot be null`)
What is it that I'm doing wrong?
Thanks!
[1]: docs.microsoft.com/.../search-resource-availability-api