Creating an Identity provider using Okta SDK Java



I’m trying to create Identity provider programmatically with the Okta SDK Java 15.0.0(the latest version) using a OIDC Service application.
I found few examples for older versions, however most of the classes are not present in the latest release.

Currently, my understanding is that an ApiClient has to be constructed, using the necessary details. After that, an IdentityProviderBuilder has to be created and initialized so that the IdP can be created.

My question is whether there’s a mechanism in the latest version of the SDK that can create an IdP and if so, I would really appreciate a simple example.

Thanks in advance.

Hi, here are a few docs you can refer to add IdPs to your Java Code

  1. Okta Identity Provider APIs -
  2. Java SDK doc -
1 Like

Hi, sorry for the late reply.

I actually found the IdentityProvider class. I used it to construct the properties of the identity provider.
For the API connection I used Clients.builder() for an ApiClient object, which I passed to the constructor of IdentityProviderApi. Then, the object of IdentityProviderApi has the method createIdentityProvider(idp), which basically uses the invokeAPI method under the hood.

Thanks for the suggestions and the docs.

1 Like

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