The settings.signOn object doesn't match the type indicated by signOnMode value or is ill defined

My company is doing an Okta SDK upgrading from 15 to 21.

We had code that would create an Application.

I’m getting the following error.
{“errorCode”:“E0000001”,“errorSummary”:“Api validation failed: mediated”,“errorLink”:“E0000001”,“errorId”:“oae7-tAznSQR4u9e85T8TV4bw”,“errorCauses”:[{“errorSummary”:“Invalid signOnMode”},{“errorSummary”:“The settings.signOn object doesn’t match the type indicated by signOnMode value or is ill defined”}]}

Doesn’t look like our code needed to change.
There is a field called “setSignOnMode”, I don’t know if this existed before, but we didn’t use it.

        theApp =
            OIDCApplicationBuilder.instance()
                .addGrantTypes(OAuthGrantType.AUTHORIZATION_CODE)
                  //  .setSignOnMode(ApplicationSignOnMode.OPENID_CONNECT)
                .setLabel(appName)
                .addResponseTypes(OAuthResponseType.CODE) 
                .setApplicationType(applicationType)
                .setTokenEndpointAuthMethod(
                    (applicationType.equals(OpenIdConnectApplicationType.WEB))
                        ? OAuthEndpointAuthenticationMethod.CLIENT_SECRET_BASIC
                        : OAuthEndpointAuthenticationMethod.NONE)
                .setRedirectUris(signInRedirectUri)
                .setPostLogoutRedirectUris(signOutRedirectUri)
                .setIOS(true)
                .setWeb(true)
                .buildAndCreate(oktaApplicationApi);

As you can see I have tried to add the signon value with OPENID_CONNECT, but I get the same error with or without that value.

Any idea what I’m doing wrong?

Try:

OIDCApplicationBuilder.instance().setName(“oidc_client”)…

We ran into the same issue after upgrading from 8.x to 22 and this resolved it.

1 Like