Policy Creation fails after upgrading to sdk v13.0.2

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();

        PolicyRuleConditions policyRuleConditions = new PolicyRuleConditions();
        policyRuleConditions.setClients(new ClientPolicyCondition().addIncludeItem(applicationId));


        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?


Looks like a bug,
The endpoint should take OAUTH_AUTHORIZATION_POLICY
Authorization Servers | Okta Developer.

The latest openAPI spec doesn’t look like it has it listed.

PolicyType (Okta Java SDK 13.0.2 API).

Thank You,

Hey Erik,

Thank you for this info. Looks like my team and I will just have to roll back to a previous version.


Wanted to fix my post a bit.

Above in my code flow, I meant to say that I was feeding the endpoint OAUTH_AUTHORIZATION_POLICY and that is what was working on v10.3.0.

Nonetheless, thank you for pointing out that the PolicyType is flat out missing in v13.0.3.

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