From 5a3b13f256629963a687960f9da2bcc2c355c0e2 Mon Sep 17 00:00:00 2001 From: David-Lor <17401854+David-Lor@users.noreply.github.com> Date: Sun, 6 Sep 2020 19:10:29 +0200 Subject: [PATCH] docs: add example to assign realm roles to user in README --- README.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/README.md b/README.md index 5f39f86..67a51d1 100644 --- a/README.md +++ b/README.md @@ -235,6 +235,10 @@ realm_roles = keycloak_admin.get_roles() # Assign client role to user. Note that BOTH role_name and role_id appear to be required. keycloak_admin.assign_client_role(client_id=client_id, user_id=user_id, role_id=role_id, role_name="test") +# Assign realm roles to user +keycloak_admin.assign_realm_roles(user_id=user_id, roles=realm_roles) + + # Get all ID Providers idps = keycloak_admin.get_idps()