Dashboard bootstrap user organisation

Hi. I’ve been attempting to create a (vaguely) idempotent bootstrap process in ansible, lifting the API requests from the bootstrap script. When it comes to creating a user with the admin API, the bootstrap script passes the newly created org_id in the request - however when running the API request myself, this appears to have no effect, and the user gets created with a non-existent organisation ID. The organisation definitely exists.

{
“organisations”: [
{
“id”: “5a4fa8cfb6391bf2edd62e16”,
“owner_name”: “Test org”,
“owner_slug”: “testorg”,
“cname_enabled”: false,
“cname”: “”,
“apis”: [],
“developer_quota”: 0,
“developer_count”: 0,
“event_options”: {},
“hybrid_enabled”: false,
“ui”: {
“languages”: {},
“hide_help”: false,
“default_lang”: “”,
“login_page”: {},
“nav”: {},
“uptime”: {},
“portal_section”: {},
“designer”: {},
“dont_show_admin_sockets”: false,
“dont_allow_license_management”: false,
“dont_allow_license_management_view”: false
},
“org_options_meta”: {}
}
],
“pages”: 0
}

cURL command:
curl --silent --header “admin-auth: 12345” --header “Content-Type:application/json” --data ‘{“first_name”: “Tyk”,“last_name”: “Admin”,“email_address”: “[email protected]”,“password”:“tykadmin”, “active”: true,“org_id”: “5a4fa8cfb6391bf2edd62e16”}’ http://localhost:3000/admin/users

Response:
{“Status”:“OK”,“Message”:“de27c8fa8cca416359d14bea58fe4123”,“Meta”:{“api_model”:{},“first_name":“Tyk”,“last_name”:“Admin”,“email_address”:"[email protected]”,“org_id”:“5a4e4ac3b6391bf2edd62e0c”,“active”:true,“id”:“5a4e4ac334c800da29195e74”,“access_key”:“de27c8fa8cca416359d14bea58fe4123”,“user_permissions”:{}}}

Another weird thing is that in the logs, it states “User pasword is empty! Please reset!” even though I’m providing a password.

Any ideas what could be going wrong? Dashboard version 1.4.0.

Hi Luke,

I’ll try to replicate this issue and get back to you.

Thanks,
Luan

Hi Luke,

I haven’t had the chance to replicate this yet since we’re busy finalising things for the upcoming release. I’ll look into this as soon as I get the chance this week.

Thanks for your patience,
Luan