Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error when using KeycloakAdmin assign_client_role #639

Open
Lucas08Ben opened this issue Feb 16, 2025 · 0 comments
Open

Error when using KeycloakAdmin assign_client_role #639

Lucas08Ben opened this issue Feb 16, 2025 · 0 comments

Comments

@Lucas08Ben
Copy link

Lucas08Ben commented Feb 16, 2025

I'm using that way:

keycloak_admin.assign_client_role(client_id=client_id,
                                      user_id=user_id,
                                      roles="role_name")

but it returns a type of error that I don't know how fix:

File ".venv/lib/python3.12/site-packages/keycloak/keycloak_admin.py", line 2723, in assign_client_role
    return raise_error_from_response("
File ".../.venv/lib/python3.12/site-packages/keycloak/exceptions.py", line 195, in raise_error_from_response
    raise error("
keycloak.exceptions.KeycloakPostError: 400: b'{"error":"unknown_error","error_description":"Cannot parse the JSON"}'

I'm using python-keycloak==5.3.1 and python==3.12
And the instance of keycloak is running the version 26.1.2

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant