If you would like to do a bulk import of your users, you have a few options:
Use our Invite Your Team Form in the Web Application
Our Users page has an easy to use form for inviting new users to your account. Just click on the green Add Users button and you will see this form:
From here, you can enter the name of the user you would like to invite, their email, and the role you would like them to take. Once that information is entered, click Add to add them to the list of users to be invited.
If you entered an attribute incorrectly, you can delete any of the users-to-be by clicking the "x" on their tag. When you have added all of the users you would like to invite, click on the Send Invites button.
Once the data has been processed, you will get a message saying how many users were invited, and which ones were not able to be created (if any).
Import users on your own from a CSV file using Ruby
We've written a Ruby script that you can use to import users on your own: import_users.rb
You'll want to pass a full-access v2 API access token, the requester email of the user making the change, and the path to your CSV file as command line arguments; here, an example command is shown:
import_users.rb -a tKvs3QDNi84Nl326Krdz -e firstname.lastname@example.org -f ./users.csv
If you do not add a -t flag, any teams that cannot be found will be skipped. If you do add this flag, any teams that cannot be found will be auto-provisioned.
The usage instructions for the tool can be found by executing the script with a
Usage: import_users.rb [options]
-a, --access-token [String] Access Token
-e, --requester-email [String] Requester Email
-f, --csv-path [String] Path to CSV file
-t, --[no-]create-teams Auto-provision teams that do not already exist
The CSV file can be named anything - you'll just need to make sure the path is correct.
Below is the required format for the CSV file. The email address and phone number will be set up as an immediate notification rule for the user (for both phone calls and SMS). The user's role can either be
read_only_user (known as Stakeholder user), and defaults to
user if not specified. You can find additional information on user roles and permissions here.
The CSV file should be in format name,email,role,title,country code,phone number,team 1;team 2;team 3. There's no need to include a header in the file and the title and teams are optional. If the user is on multiple teams, they should be separated by a semicolon. Here's a sample CSV:
Joe User,email@example.com,user,Operations Engineer,1,5555555555,Engineering;Operations
Bob Dobbs,firstname.lastname@example.org,admin,Director of Engineering,86,15555555554,Engineering;Operations;Leadership
Have PagerDuty import users for you
Download the attached template CSV file, populate it with your users' data, and send the file to our support team.
Note: As with running the the Ruby script yourself, you can only include one contact method in addition to email.