Hi,
I’m using okta-sdk-java to update apps in Okta from a JSON payload get from another tenant.
My issue is that updating an OIDC app doesn’t work when i’m using the .update()
function, I’m getting HTTP 400, Okta E0000003 (The request body was not well-formed.)
.
So I must be missing something because if I’m parsing my object to a JSON String and send it with Postman I’m not getting any error and the app is updated.
But as there is no way to see the real json payload or request sent to Okta ( or if there is a way I didn’t find it), I’m kind of stuck here.
Application oidcApp = OIDCApplicationBuilder.instance()
.setName(name)
.setLabel(label)
.setGrantTypes(grantTypes)
.setResponseTypes(responseTypes)
.setApplicationType(applicationType)
.setTokenEndpointAuthMethod(authenticationMethod)
.setRedirectUris(redirectUris)
.buildAndCreate(okta);
oidcApp.put("status", status);
oidcApp.put("accessibility", accessibility);
oidcApp.put("visibility", visibility);
oidcApp.put("licensing", licensing);
oidcApp.put("features", features);
oidcApp.put("signOnMode", signOnMode);
oidcApp.put("credentials", credentials);
oidcApp.put("settings", settings);
Gson gson = new Gson();
String json = gson.toJson(oidcApp);
System.out.println(json);
oidcApp.update();