Hi,
We have an SSO enabled onprem installation, and I need to create machine user account and have successfully done so using the following curl commands
Get SSO token:
curl "https://api-mgmt-ui-company.com:9099/oauth/token" -i -X POST -H 'Accept: application/json' -H 'Content-Type: application/x-www-form-urlencoded' -d "response_type=token" -d "grant_type=client_credentials" --data-urlencode "client_secret=TheSSOAdminPasword" --data-urlencode "client_id=ssoadmin" -k
Create the user:
curl "https://api-mgmt-ui-company.com:9099/Users" -i -X POST -H "Accept: application/json" -H "Content-Type: application/json" -d '{"userName" : "email@email.com", "name" : {"formatted":"Display Name", "familyName" : "Lastname", "givenName" : "Firstname"}, "emails" : [ {"value" : "email@email.com", "primary" : true } ], "active" : true, "verified" : true, "password" : "SelectAPassword" }' -H "Authorization: Bearer TokenFromStep1" -k
The above steps worked fine and the user was created, however the account was not assigned to any organization so it does not show up in the Edge UI. I have been searching in the documentation on how to assign a user to and org but so far not found the solution.
Let me know if you have any ideas or if you can point me to some documentation that may be of help.
Best Regards
Jerry
You'll need to add the user to a role in the organization(s) you want them to be added to: https://apidocs.apigee.com/management/apis/post/organizations/%7Borg_name%7D/userroles/%7Brole_name%...
More details on users: https://docs.apigee.com/api-platform/system-administration/about-global-users