Search code examples
looker-studio

How to update permissions for a user in looker studio api?


I try to update permissions for some users. Here is a req body:

{
      "permissions": {
          "permissions": {
              "EDITOR": {
                  "members": [
                      "user:[email protected]"
                  ]
              },
              "VIEWER": {
                  "members": [
                      "user:[email protected]"
                  ]
              }
          }
      }
  }

and then i get Error: Got error "Forbidden", status - "403", body: {"error":{"code":403,"message":"Owner is not allowed to be modified","status":"PERMISSION_DENIED"}}

Even though i am NOT trying to modify the owner

I tried to modify the req body but it didnt help


Solution

  • You need to put always the OWNER because, in your request body, you are not specifying who is the OWNER.

    Example:

    {
      "permissions": {
        "permissions": {
          "OWNER": {
            "members": [
              "user:[email protected]"
            ]
          },
          "VIEWER": {
            "members": [
              "user:[email protected]"
            ]
          }
        }
      }
    }