When making an API call to Orchestrator, although the requested parameters are supplied in Json format, the response shows the error message '{Parameter} must not be null'
Issue Description:
Some API calls to Orchestrator, such as OData.AssignDirectoryUser, may trigger the error message '{Parameter} must not be null' when there is a syntax error or when values are provided with an incorrect data type that does not match the expected type for the request.
The parameter name indicated in the error message may not always correspond to the specific parameter but to the parameters group.
For instance, a POST request with the following parameters could generate the error: 'assignDomainUserActionParameters must not be null':
"assignment": {
"Domain": "autogen",
"DirectoryIdentifier": "ffffffffffffff",
"UserType": "DirectoryRobot",
"RolesPerFolder": [
{
"FolderId": "43201",
"RoleIds": "[7631]"
}
]
}
In this example, the FolderId should be an integer, and RoleIds should be an array of integers.
Resolution:
It is recommended to check the outbound request to ensure there are no syntax errors and that the data types of the values are correct. Comparing the request with the one shown in Swagger can help verify that the request syntax is correct. Testing the request in Swagger can also help ensure that it follows the expected format.