Adding multiple entitlements with separate api calls in one request

Hi @dylanfoggan , I managed to clear the 401 error. Most likely the token expired. However, I am still getting the


 String response = restClient.executePut(httpRequest("/iam/namespace/group/" + entitlement + "/members"),requestEndPoint.getBody(),requestEndPoint.getHeader(),requestEndPoint.getResponseCode());

am I missing any configurations when calling restClient.executePut since I tested in postman with all the same headers and body I can get success code of 200. Just wondering the use of restClient.executePut method does it require any special json handling?

Hi @shijingg ,

The body you set in the restClient.executePut request comes directly from the operation, so it is already formatted correctly.

Based on what has been provided I do not see a clear indication of an issue that would cause the error.

What I would suggest you attempt to test is to temporarily remove the rule set on the operation and hard code all the values to the operation in IdentityIQ. If the single request executes correctly then it would suggest the issue is in the Rule and how the data is being set.

Please test that and let me know how it goes.

kind regards,

Hi @dylanfoggan , I have tested hardcoding the values before and it is successful. Not sure if this is useful info but in the api specs it actually mentioned that request body schema: application/json is required. Is there something I am missing while before sending the body?

image

  1. Postman successful
  2. I took the postman code and did a curl I got
    image

Hi @shijingg ,

You could attempt to add Content-Type / application/json to the headers.

Thanks,

Hi @dylanfoggan, I tried to add Content-Type application/json still same error 400. On top I also have below findings.

  1. Postman successful
  2. I took the postman code and did a curl from command line I got
    image

Any clue why the difference in outcomes with postman and curl?

Hi all

I have a very similar case and I am implementing a Before Provisioning rule but when creating the new URL it comes with all the entitlements in the form of a list something like this:

https://mydomain.com:443/baw/test2group/[Entitlement1, Entitlement2, Entitlement3]?action=addMember&[email protected]&parts=all

Any ideas to return an endpoint for each entitlement?