Create user endpoint doesn't set email, groups and roles

  • 29 September 2021
  • 2 replies


I’m  using looker api v3.1. I’m trying to create a user with “POST/api/3.1/users” endpoint. It returns successful, but it doesn’t set user’s email, groups and roles. Email and roles are returning as null, groups field is not what I’ve sent.

Am I missing something? My request and responses are below:


"email": "",
"first_name": "Jhon",
"is_disabled": false,
"last_name": "Doe",
"group_ids": [3],
"role_ids": [5],
"credentials_email": {
"email": "",
"is_disabled": false,
"type": "email",
"forced_password_reset_at_next_login": false


"avatar_url": "",
"avatar_url_without_sizing": "",
"credentials_api3": [],
"credentials_email": null,
"credentials_embed": [],
"credentials_google": null,
"credentials_ldap": null,
"credentials_looker_openid": null,
"credentials_oidc": null,
"credentials_saml": null,
"credentials_totp": null,
"email": null,
"first_name": "Jhon",
"home_space_id": "1",
"id": 15,
"last_name": "Doe",
"locale": "en",
"looker_versions": [],
"models_dir_validated": null,
"personal_space_id": 20,
"ui_state": null,
"embed_group_space_id": null,
"home_folder_id": "1",
"personal_folder_id": 20,
"presumed_looker_employee": false,
"sessions": [],
"verified_looker_employee": false,
"roles_externally_managed": false,
"allow_direct_roles": true,
"allow_normal_group_membership": true,
"allow_roles_from_normal_groups": true,
"display_name": "Jhon Doe",
"group_ids": [
"is_disabled": false,
"role_ids": [],
"url": "https://localhost:19999/api/3.1/users/15",
"can": {
"show": true,
"index": true,
"show_details": true,
"index_details": true,
"sudo": true



Best answer by Lan 4 October 2021, 09:59

View original

This topic has been closed for comments

2 replies

Userlevel 4

Hi @mehmety 

Email, groups, and roles are read-only for POST/api/3.1/users, meaning that the values for these keys can’t be changed (more info here, please take a look at “response class”

To update emails, groups, and roles, you would need to use other endpoints (i.e.: PUT/api/3.1/users/{user_id}/roles, ...). 

This article describes the workflow with setting up a new user with Looker Python SDK.


Hope this helps.


Thanks for your help @Lan , I should have been more careful.