Hi all,
My team recently decided to upgrade from sdk v10.3.0 to v13.0.2 and I’m having a hard time refactoring a short flow for creating a new AuthorizationServerPolicy.
Here is the code snippet
AuthorizationServerPolicy authorizationServerPolicy = new AuthorizationServerPolicy();
authorizationServerPolicy.setName(applicationName);
authorizationServerPolicy.setDescription(POLICY_DESCRIPTION);
authorizationServerPolicy.setType(PolicyType.ACCESS_POLICY);
authorizationServerPolicy.setStatus(LifecycleStatus.ACTIVE);
authorizationServerPolicy.setPriority(1);
authorizationServerPolicy.setSystem(true);
PolicyRuleConditions policyRuleConditions = new PolicyRuleConditions();
policyRuleConditions.setClients(new ClientPolicyCondition().addIncludeItem(applicationId));
authorizationServerPolicy.setConditions(policyRuleConditions);
return authorizationServerApi.createAuthorizationServerPolicy(oktaClientAuthServer, authorizationServerPolicy);
Basically, I’m just constructing an AuthorizationServerPolicy, giving it an appId that it should be assigned to, and attempting to create it. I noticed from v10.3.0 to v13.0.2, the OAUTH_AUTHORIZATION_POLICY
type was removed, and decided the ACCESS_POLICY
type was the best choice after reading some docs.
The flow above works in v10.3.0, but I receive
\"errorCode\":\"E0000003\",\"errorSummary\":\"The request body was not well-formed.\
As a result.
Any ideas what’s going on?