https://rancher.com/ logo
Title
f

future-restaurant-54259

05/01/2023, 12:33 PM
Can I Create Users Through API ?
s

sparse-fireman-14239

05/01/2023, 1:26 PM
yes
f

freezing-hairdresser-79403

05/01/2023, 2:35 PM
Is it possible to enable an external identity provider such as Azure AD using API? Activating this feature is not working when using the Helm Chart and setting an extraEnv environment variable for Rancher deployment.
f

future-restaurant-54259

05/02/2023, 5:26 AM
Im Trying This
curl -u "token-xxxx:pw8txxxxxxxxxxxxxxxxxxxxxxxxxxg2x66fh" \
-X POST \
-H 'Accept: application/json' \
-H 'Content-Type: application/json' \
'<https://1x.1xx.1xx.1xx/v3/users>'

HTTP/1.1 POST /v3/users
Host: 1x.1xx.1xx.1xx
Accept: application/json
Content-Type: application/json
Content-Length: 307

{
"annotations": {
"<http://lifecycle.cattle.io/create.mgmt-auth-users-controller|lifecycle.cattle.io/create.mgmt-auth-users-controller>": "true"
},
"description": "Test For Rancher Automation",
"enabled": true,
"labels": {
"<http://cattle.io/creator|cattle.io/creator>": "norman"
},
"mustChangePassword": true,
"name": "Rancher Test",
"password": "password123@3545%098g",
"principalIds": [ ],
"username": "ranchertester"
}
But Its Not Working. Getting This As An Error:
curl: (60) SSL certificate problem: self-signed certificate in certificate chain
More details here: <https://curl.se/docs/sslcerts.html>

curl failed to verify the legitimacy of the server and therefore could not
establish a secure connection to it. To learn more about this situation and
how to fix it, please visit the web page mentioned above.
f

freezing-hairdresser-79403

05/02/2023, 7:49 AM
Are you using the self-signed certificate ? Please make sure to add
-k
to the curl command
f

future-restaurant-54259

05/02/2023, 8:59 AM
Using ALB. and Also Added -k And Tried. Still Same Issue
f

freezing-hairdresser-79403

05/02/2023, 9:36 AM
Here's another option that may be useful to you: you can create the user directly from the Rancher UI, and then inspect the web page to see the rights information that the user is using to make this request possible
It seems to be a issue with your SSL certificate
But make sure before if you are not missing a importent filed in your request payload
f

future-restaurant-54259

05/02/2023, 9:40 AM
Ok. Will Give It A Try