I have a problem. I use okta for my app login but I wanna try to use it for manage the users directly on the app. For this, I like to connect on okta and show all users. But, the client credentials doesn’t work. My frontend call my backend like localhost:8080/users or localhost:8080/users/id to see some specific but nothing works. I’ve tried to use this:
Client client = Clients.builder()
.setOrgUrl(“https://{yourOktaDomain}”) // e.g. https://dev-123456.okta.com
.setAuthorizationMode(AuthorizationMode.PRIVATE_KEY)
.setClientId("{clientId}")
.setScopes(new HashSet<>(Arrays.asList(“okta.users.read”, “okta.apps.read”)))
.setPrivateKey("/path/to/yourPrivateKey.pem")
.build();
or
Client client = Clients.builder()
.setOrgUrl(“https://{yourOktaDomain}”) // e.g. https://dev-123456.okta.com
.setClientCredentials(new TokenClientCredentials("{apiToken}"))
.build();
but the info that they expect I don’t have or it’s impracticable.
Thanks for helping