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.
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
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?
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 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
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 ?