API Create User With Password

Hi, We are attempting to use the API to add new users. Some questions:

  • Is it possible to retrieve the temporary password that Metabase generates? Either in the POST response or otherwise?

  • Is it possible to specify the password in the /api/user POST? There is a login_attributes param but it doesn't seem to use password.

  • If the answer to the above questions is no, then is it possible to auto add a user (no manual admin steps) without using the system generated email to send the new user a temporary password?

Thanks in advance.

Diagnostic Info:

{
"browser-info": {
"language": "en-US",
"platform": "Win32",
"userAgent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/111.0.0.0 Safari/537.36",
"vendor": "Google Inc."
},
"system-info": {
"file.encoding": "UTF-8",
"java.runtime.name": "OpenJDK Runtime Environment",
"java.runtime.version": "11.0.17+8",
"java.vendor": "Eclipse Adoptium",
"java.vendor.url": "https://adoptium.net/",
"java.version": "11.0.17",
"java.vm.name": "OpenJDK 64-Bit Server VM",
"java.vm.version": "11.0.17+8",
"os.name": "Linux",
"os.version": "4.19.128-microsoft-standard",
"user.language": "en",
"user.timezone": "GMT"
},
"metabase-info": {
"databases": [
"h2",
"mongo"
],
"hosting-env": "unknown",
"application-database": "postgres",
"application-database-details": {
"database": {
"name": "PostgreSQL",
"version": "15.2 (Debian 15.2-1.pgdg110+1)"
},
"jdbc-driver": {
"name": "PostgreSQL JDBC Driver",
"version": "42.5.0"
}
},
"run-mode": "prod",
"version": {
"date": "2022-12-07",
"tag": "v0.45.1",
"branch": "release-x.45.x",
"hash": "019d31c"
},
"settings": {
"report-timezone": null
}
}
}

check one of my examples, e.g. GitHub - paoliniluis/metabase-standalone-ssl: Metabase running standalone with Jetty with SSL (setup folder with the sh script)

Thanks. The API docs for POST /api/setup read:

Special endpoint for creating the first user during setup. This endpoint both creates the user AND logs them in and returns a session ID. This endpoint can also be used to add a database, create and invite a second admin, and/or set specific settings from the setup flow.

The topic is regarding creating new non-admin users after setup, not the first user or a second admin, and not during setup. Does the referenced solution suggest that the answer to the first two questions in the original post is no? Is there an API method to create a new non-admin user after setup that allows to either supply the password, or to retrieve the temporary password?

Thanks again.

I would suggest you open the browser dev tools when you perform those actions and see which apis are being called by your browser. Then you can do that programatically