Skip to main content

Update Password Policy by ID

PUT 

https://sailpoint.api.identitynow.com/beta/password-policies/:id

This API updates the specified password policy.

Request

Path Parameters

    id stringrequired

    The ID of password policy to update.

    Example: ff808081838d9e9d01838da6a03e0007

Bodyrequired

    idstring

    The password policy Id.

    Example: 2c91808e7d976f3b017d9f5ceae440c8
    descriptionstringnullable

    Description for current password policy.

    Example: Information about the Password Policy
    namestring

    The name of the password policy.

    Example: PasswordPolicy Example
    dateCreateddate-time

    Date the Password Policy was created.

    Example: 1639056206564
    lastUpdateddate-timenullable

    Date the Password Policy was updated.

    Example: 1939056206564
    firstExpirationReminderint64

    The number of days before expiration remaninder.

    Example: 45
    accountIdMinWordLengthint64

    The minimun length of account Id. By default is equals to -1.

    Example: 4
    accountNameMinWordLengthint64

    The minimun length of account name. By default is equals to -1.

    Example: 6
    minAlphaint64

    Maximum alpha. By default is equals to 0.

    Example: 5
    minCharacterTypesint64

    MinCharacterTypes. By default is equals to -1.

    Example: 5
    maxLengthint64

    Maximum length of the password.

    Example: 25
    minLengthint64

    Minimum length of the password. By default is equals to 0.

    Example: 8
    maxRepeatedCharsint64

    Maximum repetition of the same character in the password. By default is equals to -1.

    Example: 3
    minLowerint64

    Minimum amount of lower case character in the password. By default is equals to 0.

    Example: 8
    minNumericint64

    Minimum amount of numeric characters in the password. By default is equals to 0.

    Example: 8
    minSpecialint64

    Minimum amount of special symbols in the password. By default is equals to 0.

    Example: 8
    minUpperint64

    Minimum amount of upper case symbols in the password. By default is equals to 0.

    Example: 8
    passwordExpirationint64

    Number of days before current password expires. By default is equals to 90.

    Example: 8
    defaultPolicyboolean

    Defines whether this policy is default or not. Default policy is created automatically when an org is setup. This field is false by default.

    Default value: false
    Example: true
    enablePasswdExpirationboolean

    Defines whether this policy is enabled to expire or not. This field is false by default.

    Default value: false
    Example: true
    requireStrongAuthnboolean

    Defines whether this policy require strong Auth or not. This field is false by default.

    Default value: false
    Example: true
    requireStrongAuthOffNetworkboolean

    Defines whether this policy require strong Auth of network or not. This field is false by default.

    Default value: false
    Example: true
    requireStrongAuthUntrustedGeographiesboolean

    Defines whether this policy require strong Auth for untrusted geographies. This field is false by default.

    Default value: false
    Example: true
    useAccountAttributesboolean

    Defines whether this policy uses account attributes or not. This field is false by default.

    Default value: false
    Example: false
    useDictionaryboolean

    Defines whether this policy uses dictionary or not. This field is false by default.

    Default value: false
    Example: false
    useIdentityAttributesboolean

    Defines whether this policy uses identity attributes or not. This field is false by default.

    Default value: false
    Example: false
    validateAgainstAccountIdboolean

    Defines whether this policy validate against account id or not. This field is false by default.

    Default value: false
    Example: false
    validateAgainstAccountNameboolean

    Defines whether this policy validate against account name or not. This field is false by default.

    Default value: false
    Example: true
    createdstringnullable
    modifiedstringnullable
    sourceIdsstring[]

    List of sources IDs managed by this password policy.

    Example: ["2c91808382ffee0b01830de154f14034","2f98808382ffee0b01830de154f12134"]

Responses

Reference to the password policy.

Schema
    idstring

    The password policy Id.

    Example: 2c91808e7d976f3b017d9f5ceae440c8
    descriptionstringnullable

    Description for current password policy.

    Example: Information about the Password Policy
    namestring

    The name of the password policy.

    Example: PasswordPolicy Example
    dateCreateddate-time

    Date the Password Policy was created.

    Example: 1639056206564
    lastUpdateddate-timenullable

    Date the Password Policy was updated.

    Example: 1939056206564
    firstExpirationReminderint64

    The number of days before expiration remaninder.

    Example: 45
    accountIdMinWordLengthint64

    The minimun length of account Id. By default is equals to -1.

    Example: 4
    accountNameMinWordLengthint64

    The minimun length of account name. By default is equals to -1.

    Example: 6
    minAlphaint64

    Maximum alpha. By default is equals to 0.

    Example: 5
    minCharacterTypesint64

    MinCharacterTypes. By default is equals to -1.

    Example: 5
    maxLengthint64

    Maximum length of the password.

    Example: 25
    minLengthint64

    Minimum length of the password. By default is equals to 0.

    Example: 8
    maxRepeatedCharsint64

    Maximum repetition of the same character in the password. By default is equals to -1.

    Example: 3
    minLowerint64

    Minimum amount of lower case character in the password. By default is equals to 0.

    Example: 8
    minNumericint64

    Minimum amount of numeric characters in the password. By default is equals to 0.

    Example: 8
    minSpecialint64

    Minimum amount of special symbols in the password. By default is equals to 0.

    Example: 8
    minUpperint64

    Minimum amount of upper case symbols in the password. By default is equals to 0.

    Example: 8
    passwordExpirationint64

    Number of days before current password expires. By default is equals to 90.

    Example: 8
    defaultPolicyboolean

    Defines whether this policy is default or not. Default policy is created automatically when an org is setup. This field is false by default.

    Default value: false
    Example: true
    enablePasswdExpirationboolean

    Defines whether this policy is enabled to expire or not. This field is false by default.

    Default value: false
    Example: true
    requireStrongAuthnboolean

    Defines whether this policy require strong Auth or not. This field is false by default.

    Default value: false
    Example: true
    requireStrongAuthOffNetworkboolean

    Defines whether this policy require strong Auth of network or not. This field is false by default.

    Default value: false
    Example: true
    requireStrongAuthUntrustedGeographiesboolean

    Defines whether this policy require strong Auth for untrusted geographies. This field is false by default.

    Default value: false
    Example: true
    useAccountAttributesboolean

    Defines whether this policy uses account attributes or not. This field is false by default.

    Default value: false
    Example: false
    useDictionaryboolean

    Defines whether this policy uses dictionary or not. This field is false by default.

    Default value: false
    Example: false
    useIdentityAttributesboolean

    Defines whether this policy uses identity attributes or not. This field is false by default.

    Default value: false
    Example: false
    validateAgainstAccountIdboolean

    Defines whether this policy validate against account id or not. This field is false by default.

    Default value: false
    Example: false
    validateAgainstAccountNameboolean

    Defines whether this policy validate against account name or not. This field is false by default.

    Default value: false
    Example: true
    createdstringnullable
    modifiedstringnullable
    sourceIdsstring[]

    List of sources IDs managed by this password policy.

    Example: ["2c91808382ffee0b01830de154f14034","2f98808382ffee0b01830de154f12134"]

Authorization: oauth2

type: Personal Access Token
scopes: idn:password-policy:write
user levels: ORG_ADMIN

View SDK Reference

package main

import (
"context"
"fmt"
"os"
"encoding/json"
beta "github.com/sailpoint-oss/golang-sdk/v2/api_beta"
sailpoint "github.com/sailpoint-oss/golang-sdk/v2"
)

func main() {
id := `ff808081838d9e9d01838da6a03e0007` // string | The ID of password policy to update. # string | The ID of password policy to update.
passwordpolicyv3dto := []byte(`{
"validateAgainstAccountName" : true,
"minLength" : 8,
"description" : "Information about the Password Policy",
"requireStrongAuthUntrustedGeographies" : true,
"enablePasswdExpiration" : true,
"minNumeric" : 8,
"lastUpdated" : "2000-01-23T04:56:07.000+00:00",
"validateAgainstAccountId" : false,
"dateCreated" : "2000-01-23T04:56:07.000+00:00",
"accountNameMinWordLength" : 6,
"minUpper" : 8,
"firstExpirationReminder" : 45,
"modified" : "modified",
"id" : "2c91808e7d976f3b017d9f5ceae440c8",
"requireStrongAuthn" : true,
"useDictionary" : false,
"minSpecial" : 8,
"sourceIds" : [ "2c91808382ffee0b01830de154f14034", "2f98808382ffee0b01830de154f12134" ],
"passwordExpiration" : 8,
"maxRepeatedChars" : 3,
"minCharacterTypes" : 5,
"minAlpha" : 5,
"created" : "created",
"useAccountAttributes" : false,
"accountIdMinWordLength" : 4,
"minLower" : 8,
"useIdentityAttributes" : false,
"defaultPolicy" : true,
"requireStrongAuthOffNetwork" : true,
"name" : "PasswordPolicy Example",
"maxLength" : 25
}`) // PasswordPolicyV3Dto |


var passwordPolicyV3Dto beta.PasswordPolicyV3Dto
if err := json.Unmarshal(passwordpolicyv3dto, &passwordPolicyV3Dto); err != nil {
fmt.Println("Error:", err)
return
}



configuration := sailpoint.NewDefaultConfiguration()
apiClient := sailpoint.NewAPIClient(configuration)
resp, r, err := apiClient.Beta.PasswordPoliciesAPI.SetPasswordPolicy(context.Background(), id).PasswordPolicyV3Dto(passwordPolicyV3Dto).Execute()
//resp, r, err := apiClient.Beta.PasswordPoliciesAPI.SetPasswordPolicy(context.Background(), id).PasswordPolicyV3Dto(passwordPolicyV3Dto).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `PasswordPoliciesAPI.SetPasswordPolicy``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `SetPasswordPolicy`: PasswordPolicyV3Dto
fmt.Fprintf(os.Stdout, "Response from `PasswordPoliciesAPI.SetPasswordPolicy`: %v\n", resp)
}
Request Collapse all
Base URL
https://sailpoint.api.identitynow.com/beta
Auth
Parameters
— pathrequired
Body required
{
  "id": "2c91808e7d976f3b017d9f5ceae440c8",
  "description": "Information about the Password Policy",
  "name": "PasswordPolicy Example",
  "dateCreated": 1639056206564,
  "lastUpdated": 1939056206564,
  "firstExpirationReminder": 45,
  "accountIdMinWordLength": 4,
  "accountNameMinWordLength": 6,
  "minAlpha": 5,
  "minCharacterTypes": 5,
  "maxLength": 25,
  "minLength": 8,
  "maxRepeatedChars": 3,
  "minLower": 8,
  "minNumeric": 8,
  "minSpecial": 8,
  "minUpper": 8,
  "passwordExpiration": 8,
  "defaultPolicy": true,
  "enablePasswdExpiration": true,
  "requireStrongAuthn": true,
  "requireStrongAuthOffNetwork": true,
  "requireStrongAuthUntrustedGeographies": true,
  "useAccountAttributes": false,
  "useDictionary": false,
  "useIdentityAttributes": false,
  "validateAgainstAccountId": false,
  "validateAgainstAccountName": true,
  "created": "string",
  "modified": "string",
  "sourceIds": [
    "2c91808382ffee0b01830de154f14034",
    "2f98808382ffee0b01830de154f12134"
  ]
}
ResponseClear

Click the Send API Request button above and see the response here!