2 Add Entitlement operation in Webservice connector

Hi All,

I just need some help regarding one of our Web Service connector. I have a requirement wherein I need to provision the site role and add the user into a group. For this, I used 2 http operation of “Add Entitlement”. I previously setup the provisioning of site role which works fine but when I tried to add the 2nd Add Entitlement to add the user to a group, I am getting this error:

Exception while updating account.Url: https://xxx, Message: 400 : Bad Request : {“error”:{“summary”:“Bad Request”,“detail”:“Required request body is missing: public com.tableausoftware.api.rest.IRestApiResponse com.tableausoftware.api.rest.users.RestApiUserController.updateUser(com.tableausoftware.api.rest.util.RestApiVersion,com.tableausoftware.domain.user.IAuthenticatedUser,java.lang.String,com.tableausoftware.api.rest.viewmodels.TsRequest,javax.servlet.http.HttpServletRequest,javax.servlet.http.HttpServletResponse)”,“code”:“400000”}}, HTTP Error Code: 400

This error is pointing to the 1st Add Entitlement which is to add the site role. This only happens to users who have existing account on that application. But for request to create new accounts, I do not encounter this error.

Hello Jasmine, is the “Add Entitlement 1” (one with the site role) working after configuring both the add entitlement operations?

You can also look at the ccg.log for details.
If you need to, create a Web Service Before Operation rule and attach it to both Add Entitlement operations to log what is happening

Hi @jasmedina,

I think your using same endpoint for both the operations. but to achieve your case, we need to execute two different endpoints. find below:

Update User for site Role : Update User

Add User Into a Group : Add User to Group

My suggestion is use webservice before operation rule to achieve your case.

Thank You.
Bapu.

Hi Aishwarya, it is not working after configuring both the operations. It is with that endpoint that I am receiving the error

@jasmedina ,

Make sure your target system supports to add multiple entitlements. Are you able to add group via postman into the existing account has already one site role? Did you check this works?

Hi @jasmedina

Looking at the error message it says that required body is missing in the request. Are you trying to add some user attributes too in the 2nd body operation ?

I would suggest to just try and hardcode the body once in both http operation and see if that is successful.

I hope the suggestion helps.

Regards
Vikas

Hi @sagar_kamalakar

Yes, I am able to add via postman. Everything works in postman but encountering issues in IdentityNow.

Hi @vguleria

I hardcoded the 1st Add Entitlement body which is the site role. I didn’t hardcode the 2nd Add entitlement since the body needs the User ID and this is for new account request so I didn’t know the native identity yet.

The result was the site role was added but the user was not added to the group

Hi @jasmedina

Regarding the nativeIdentity i believe you can hardcode it unless it being generated at the target application but we can check this later.

for the group not added to the user, can you please hardcode some other native identity which is already there in the target application just to see if the multiple add entitlements operation work? Then once the operation is complete, you should be able to see the site role added to correct identity but group should be assigned to different user which is hardcoded. Once that is successful, I can suggest further.

Also, do you have single account aggregation configured for this source ?

Thank You.
Regards
Vikas.

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.