[keycloak-user] Add consent programmatically

Henning Waack henning.waack at codecentric.de
Wed Jul 11 03:42:34 EDT 2018


Hi.

Using KC 4.0, I am a little confused about consents. Using the KC Admin
Client, when retrieving a UserResource I can get a (untyped) list of
consents, which represents the consents visible on the KC Admin Homepage
for a given user. Also I can revoke a consent on the UserResource object.

On the UserRepresentation object I have a method getClientConsents which
returns a list of UserConsentRepresentations. These I do not know where to
find on the Admin UI for a user. And these consents are not the same as the
one from the UserResource.

Can someone please explain the difference between these two? And my real
question is: can I programmatically set the consent for a user for a client
which requires consent?

Hope you can help, thanks in advance,

greetings

Henning


More information about the keycloak-user mailing list