I see there's a way to auto-activate users when doing a bulk (CSV) import, but is there also a way to set or specify their passwords on the Admin end? We'd like to be able to setup passwords for users rather than send them links to do so. Skip to main content
https://support.okta.com/help/answers?id=9062a000000bmcfqay&refurl=http%3a%2f%2fsupport.okta.com%2fhelp%2fanswers
How satisfied are you with the Okta Help Center?
Thank you for your feedback!
How satisfied are you with the Okta Help Center?
1
2
3
4
5
Very Dissatisfied
Very satisfied
Enter content less than 200 characters.
Ask Search:
Jordan McClureJordan McClure 

I see there's a way to auto-activate users when doing a bulk (CSV) import, but is there also a way to set or specify their passwords on the Admin end? We'd like to be able to setup passwords for users rather than send them links to do so.

Costel CurcaCostel Curca (Okta, Inc.)
Hi Jordan, there is option in Okta to setup a custom password for CSV imported users in the Administration side.
This looks like great feature to have in Okta and you can suggest it under the Ideas Category of the Community portal.
Features suggested in our community are reviewed and can be vodete by other members, making it much easier for the engineering team to understand the priorities that you ahve fir the feature request.

There is a way to accoumplish this is by using API calls with the "Users" Collection under "Lifecycle Operations", where you can generate random password for each user or use the Set password under Credential Operations where you can define the password for the users.

One example is:
1.Add all CSV imported users into a group, create the group in Okta then create a Group rule  EX: If User Attribute "AddedfromCSV" equals  Yes THEN Assign to Group.
2.To get the list of ID's for the users that are imported via CSV one idea is to use List Group Members (Users) from the Groups Collection.

3.Use the Set Password API EX: {{url}}/api/v1/users/{{userid}} with the password defined in the body.
{
  "credentials": {
    "password" : { "value": "{{password}}" }
  }
}

This operation requires some basic scripting knowledge so you can automate the Set Password for all user ID's and to strip the user ID's from the "List Group Members (Users)" result.
You can find all the information about API calls in this article.
http://developer.okta.com/docs/api/getting_started/api_test_client.html
 
Jordan McClureJordan McClure
Thank you again. I'm having some difficulty getting the Postman items that include POST or PUT to work correctly. I get the error message below. Do you have an example of one of those that works? I am using just the root of our Okta installation as the URL (https://dev-884427-admin.oktapreview.com) and then putting the userID that I get from a List Users GET query. { "errorCode": "E0000022", "errorSummary": "The endpoint does not support the provided HTTP method", "errorLink": "E0000022", "errorId": "oae4oGqegzmRw6qhNkHyBOfLQ", "errorCauses": [] } Thank you, Jordan
Gabriel SrokaGabriel Sroka (Okta, Inc.)
Hi Jordan
Try this instead: (take out the "-admin" part):
https://dev-884427.oktapreview.com
Jordan McClureJordan McClure
It still seems to be giving the same error: { "errorCode": "E0000022", "errorSummary": "The endpoint does not support the provided HTTP method", "errorLink": "E0000022", "errorId": "oaeWH20vYOsR0KQdNDXQ4izHw", "errorCauses": []
Gabriel SrokaGabriel Sroka (Okta, Inc.)
Hi Jordan
What's the full URL you're hitting?
Did you check:
http://developer.okta.com/docs/api/resources/users.html#set-password
Jordan McClureJordan McClure
Hmm. I think that all checks out (what you sent in the link). What I am sending is this: {{url}}/api/v1/users/{{userId}}?password=LoadTest!42!&userId=00u8rhzefwAUHjXqr0h7 Password and userId I have defined under Params in Postman. I've also tried putting the userId under the environment settings, but that seems to give a different error message…. still kind of stuck, unfortunately. Regards, Jordan
Gabriel SrokaGabriel Sroka (Okta, Inc.)
Hi Jordan
The password doesn't go into the URL, it goes into the body of the request; eg
{
  "credentials": {
    "password" : { "value": "LoadTest!42" }
  }
}
Also, the userId is not a parameter, but part of the URL itself, eg:
/api/v1/users/00u8rhzefwAUHjXqr0h7
 
Jordan McClureJordan McClure
I've tried that as well with the same result. Here's what I have. Under Manage Environments: · URL=https://dev-884427.oktapreview.com · Apikey=00tIr6BOE21KptKEfaEXgdARToawxFl4 · Subdomain=dev-884427 · appName=amazon_aws Using Set Password under Credential Operations PUT is {{url}}/api/v1/users/{{userId}} Under Params userId=00u8rhzefwAUHjXqr0h7 Under Body { "credentials": { "password" : { "value": "LoadTest!42!" } } } Response is: { "errorCode": "E0000022", "errorSummary": "The endpoint does not support the provided HTTP method", "errorLink": "E0000022", "errorId": "oaeVL4hoJHvSYKrxKoN1m8Pew", "errorCauses": [] }