Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
mgranillo
Specialist
Specialist

Passing Multiple Roles via the User API (Okta Integration)

Does the users API support sending multiple roles on a user create post call? The documentation only shows an example with one name in assignedRoles.  

Labels (3)
8 Replies
Levi_Turner
Employee
Employee

Sure. Example body:

{
  "name": "John Smith",
  "email": "john.smith@corp.example",
  "picture": "https://corp.example/docs/jsmith.png",
  "subject": "1234asdasa6789",
  "assignedRoles": [
    {
      "name": "Developer"
    },
    {
      "name": "TenantAdmin"
    }
  ]
}
mgranillo
Specialist
Specialist
Author

@Levi_Turner thanks for the response. Do you know if the role ID is required in the post call?

Levi_Turner
Employee
Employee

No, just the role name. The above call results in this:

Levi_Turner_0-1708721393818.png

 

(the other roles are auto-assigned by the system, which is optional, of course).

mgranillo
Specialist
Specialist
Author

@Levi_Turner I was taking a closer look at the image you sent and noticed a lot of roles showing in the permissions overview. Why does the permissions overview not just say "tenant admin" and "developer"? There are lost of other permissions listed like "autoML contributor" and "automation creator", etc. Are those defaults for every user?

Levi_Turner
Employee
Employee

For this tenant? Yes. We've set it up so that everyone who logs in get those roles.

Levi_Turner_0-1709653371912.png

You're obviously able to change that to your requirements.

mgranillo
Specialist
Specialist
Author

@Levi_Turner sorry for one more question. We're getting a 403 error: 

The traceId for the error in the json body returned 

a2e44e1bdbf445f5d676197e063dc385

Can you provide any guidance on a root cause of this type of error? Where could we be missing permissions?

Levi_Turner
Employee
Employee

403 is a post-authentication denial for permission reasons, so your user (who created the API key or the Oauth identity) isn't authorized to perform this action. 

mgranillo
Specialist
Specialist
Author

@Levi_Turner we decided to manage roles in the QMC and not send roles from Okta.  Management falls to the Qlik admin instead of our access team but that's okay for us. Thanks for your comments on this post.