rehmke
October 4, 2018, 7:08pm
1
Hello,
I found a dated API that referenced a AppUserApiClient class that allowed one to associate a User with an Application , though it seems that this has been deprecated.
I see that there is another method to do something similar (below), though it involves an AppUser - unsure what this is or how an AppUser differs from a User …?
Application.assignUserToApplication(AppUser appUser)
Please let me know how I can associate a User with an Application , and thanks.
Research:
AppUsers are slightly different than regular users in the way that they are modeled in the API (and the features the represent). Take a look at: https://developer.okta.com/docs/api/resources/apps#application-user-operations
Also for an example (albeit in groovy) take a look at this:
AppUser appUser2 = client.instantiate(AppUser)
.setScope("USER")
.setId(user2.id)
.setCredentials(client.instantiate(AppUserCredentials)
.setUserName(user2.getProfile().getEmail())
.setPassword(client.instantiate(AppUserPasswordCredential)
.setValue("super-secret2".toCharArray())))
assertThat(app.assignUserToApplication(appUser1), sameInstance(appUser1))
NOTE: the links you included were references to a legacy version of the SDK.
system
Closed
January 12, 2024, 11:46pm
4
This topic was automatically closed 24 hours after the last reply. New replies are no longer allowed.