Adding membership criteria via Script

Hi,

I’m trying to use a script to add role membership criteria for about 100 job codes from a csv file and getting the below error message, any idea?

Invoke-WebRequest: C:\program files\powershell\7\Modules\PSSailpoint\v3\src\PSSailpoint\Private\ApiClient.ps1:188
Line |
188 | $Response = Invoke-WebRequest -Uri $UriBuilder.Uri `
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
| { “messages”: [ { “localeOrigin”: “REQUEST”, “locale”: “en-US”, “text”: “The request was syntactically
| correct but its content is semantically invalid.” }, { “localeOrigin”: “DEFAULT”, “locale”: “en-US”,
| “text”: “The request was syntactically correct but its content is semantically invalid.” } ], “trackingId”:
| “32fa0f95494748fca98adac3dd72421e”, “detailCode”: “400.1 Bad request content” }

Hi @ssel ,

I see issue with the body that is being passed to the api call via ps script
Refere this IDN: Update Role Membership using Patch API Call
To change the the body of patch call then try again

For try to share the ps script by removing sensitive data maybe I can help you out there

Thanks in advance
Avinash

Thank you, I got it and the script is working now.

If it is working please mark it as solution @ssel