Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

API License Add Error

Forgive me if this is in the wrong discussion area.

I am trying to automate the setup of a Qlik Sense server and am attempting to add a license to a new Qlik Sense Enterprise server through the API.


So I'm seeing the following request:

https://WINTEST:4242/qrs/license?Xrfkey=ABCDEFG123456789&control=12345


With the following headers:

X-Qlik-Xrfkey : ABCDEFG123456789

X-Qlik-User : UserDirectory=internal;UserId=sa_repository

Content-Type : application/json

And the body:

{

    "lef": "",

    "serial": "123456789012345",

    "name": "myUser",

    "organization": "myOrg"

}

I'm getting the following 400 response:

[

    {

        "schemaPath": "User",

        "errorText": "You are not allowed to change your own role."

    }

]


Any thoughts of why I'm getting a "User" error on installing a license?  Do I need to do something with the "sa_respository" user first?


Thank you in advance for any help.

1 Solution

Accepted Solutions
Anonymous
Not applicable
Author

I found that when I use the "administrator" account for the UserID and "WINTEST" for the UserDirectory, it appears to work.

View solution in original post

2 Replies
Anonymous
Not applicable
Author

I found that when I use the "administrator" account for the UserID and "WINTEST" for the UserDirectory, it appears to work.

Not applicable
Author

Have the same problem. To clarify the answer of Charles: as a UserDirectory, use the hostname of the qlik server (in my example: DEVELOPQLIKVM), like this:

X-Qlik-User: UserDirectory=DEVELOPQLIKVM;UserId=qlikadmin

Note: you have to use the user that is given Root Access, in my case qlikadmin, not administrator (this is purely you own choice).