Skip to content
atlassian-dc-mcp
Esc
↑↓navigate↵open⌘Jpreview

Get reasons for password policy disallowance on user creation

Returns a list of statements explaining why the password policy would disallow a proposed password for a new user. You can use this method to test the password policy validation. This could be done prior to an action where a new user and related password are created, using methods like the ones in <a href=“https://docs.atlassian.com/jira/latest/com/atlassian/jira/bc/user/UserService.html">UserService&lt;/a>. For example, you could use this to validate a password in a create user form in the user interface, as the user enters it. The username and new password must be not empty to perform the validation. Note, this method will help you validate against the policy only. It won’t check any other validations that might be performed when creating a new user, e.g. checking whether a user with the same name already exists.

POST/api/2/password/policy/createUser
Authorization
AuthorizationBasic auth · headerrequired

In order to use basic authorization, provide username:password Base64 encoded in the 'Authorization' header.

or
AuthorizationBearer token · headerrequired

Personal Access Token — Administration > Profile > Personal Access Tokens

AuthorizationBasic auth · headerrequired

In order to use basic authorization, provide username:password Base64 encoded in the 'Authorization' header.

Request body
requiredapplication/json

The intended parameters for the user that would be created. The username and new password must be specified. The old password should be specified for updates where the user would be required to enter it and omitted for those like a password reset or forced change by the administrator where the old password would not be known.

displayNamestring
emailAddressstring
passwordstring
usernamestring
Responses
200

Returns a JSON array of the user-facing messages.

string
400

Returned if the request is invalid, such as if the username or password is left unspecified.

Try it
Server
Authorization
Bodyapplication/json
Request
curl -X POST 'http://jira.example.com/rest/api/2/password/policy/createUser' \
  -H 'Authorization: Basic YOUR_CREDENTIALS' \
  -H 'Accept: application/json' \
  -H 'Content-Type: application/json' \
  -d '{
  "displayName": "Fred Normal",
  "emailAddress": "fred@example.com",
  "password": "secret",
  "username": "fred"
}'
Response
"string"

Was this page helpful?