Files
developer.sailpoint.com/docs/tools/sdk/python/Reference/Beta/Methods/CustomPasswordInstructionsApi.md
2025-02-20 13:59:30 -05:00

10 KiB

id, title, pagination_label, sidebar_label, sidebar_class_name, keywords, slug, tags
id title pagination_label sidebar_label sidebar_class_name keywords slug tags
beta-custom-password-instructions Custom_Password_Instructions Custom_Password_Instructions Custom_Password_Instructions pythonsdk
python
Python
sdk
Custom_Password_Instructions
BetaCustom_Password_Instructions
/tools/sdk/python/beta/methods/custom-password-instructions
SDK
Software Development Kit
Custom_Password_Instructions
BetaCustom_Password_Instructions

sailpoint.beta.CustomPasswordInstructionsApi

Use this API to implement custom password instruction functionality. With this functionality in place, administrators can create custom password instructions to help users reset their passwords, change them, unlock their accounts, or recover their usernames. This allows administrators to emphasize password policies or provide organization-specific instructions.

Administrators must first use Update Password Org Config to set `customInstructionsEnabled` to `true`.

Once they have enabled custom instructions, they can use Create Custom Password Instructions to create custom page content for the specific pageId they select.

For example, an administrator can use the pageId forget-username:user-email to set the custom text for the case when users forget their usernames and must enter their emails.

Refer to Creating Custom Instruction Text for more information about creating custom password instructions.

All URIs are relative to https://sailpoint.api.identitynow.com/beta

Method HTTP request Description
create-custom-password-instructions POST /custom-password-instructions Create Custom Password Instructions
delete-custom-password-instructions DELETE /custom-password-instructions/{pageId} Delete Custom Password Instructions by page ID
get-custom-password-instructions GET /custom-password-instructions/{pageId} Get Custom Password Instructions by Page ID

create-custom-password-instructions

Create Custom Password Instructions This API creates the custom password instructions for the specified page ID. A token with ORG_ADMIN authority is required to call this API.

API Spec

Parameters

Param Type Name Data Type Required Description
Body custom_password_instruction CustomPasswordInstruction True

Return type

CustomPasswordInstruction

Responses

Code Description Data Type Response headers
200 Reference to the custom password instructions. CustomPasswordInstruction -
400 Client Error - Returned if the request body is invalid. ErrorResponseDto -
403 Forbidden - Returned if the user you are running as, doesn't have access to this end-point. ErrorResponseDto -
500 Internal Server Error - Returned if there is an unexpected error. ErrorResponseDto -

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

Example

import sailpoint.beta
from sailpoint.beta.models.custom_password_instruction import CustomPasswordInstruction
from sailpoint.beta.rest import ApiException
from pprint import pprint

    custom_password_instruction = {
          "pageContent" : "Please enter a new password. Your password must be at least 8 characters long and contain at least one number and one letter.",
          "pageId" : "change-password:enter-password",
          "locale" : "en"
        } # CustomPasswordInstruction | 

    try:
        # Create Custom Password Instructions
        Result = custom_password_instruction.from_json(custom_password_instruction)
        api_response = api_instance.create_custom_password_instructions(Result)
        
        # Below is a request that includes all optional parameters
        # api_response = api_instance.create_custom_password_instructions(Result)
        print("The response of CustomPasswordInstructionsApi->create_custom_password_instructions:\n")
        pprint(api_response)
    except Exception as e:
        print("Exception when calling CustomPasswordInstructionsApi->create_custom_password_instructions: %s\n" % e)

[Back to top]

delete-custom-password-instructions

Delete Custom Password Instructions by page ID This API delete the custom password instructions for the specified page ID. A token with ORG_ADMIN authority is required to call this API.

API Spec

Parameters

Param Type Name Data Type Required Description
Path page_id str True The page ID of custom password instructions to delete.
Query locale str (optional) The locale for the custom instructions, a BCP47 language tag. The default value is \"default\".

Return type

(empty response body)

Responses

Code Description Data Type Response headers
204 No content - indicates the request was successful but there is no content to be returned in the response. -
400 Client Error - Returned if the request body is invalid. ErrorResponseDto -
403 Forbidden - Returned if the user you are running as, doesn't have access to this end-point. ErrorResponseDto -
404 Not Found - returned if the request URL refers to a resource or object that does not exist ErrorResponseDto -
500 Internal Server Error - Returned if there is an unexpected error. ErrorResponseDto -

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

Example

import sailpoint.beta
from sailpoint.beta.rest import ApiException
from pprint import pprint

    page_id = 'mfa:select' # str | The page ID of custom password instructions to delete. # str | The page ID of custom password instructions to delete.
    locale = 'locale_example' # str | The locale for the custom instructions, a BCP47 language tag. The default value is \\\"default\\\". (optional) # str | The locale for the custom instructions, a BCP47 language tag. The default value is \\\"default\\\". (optional)

    try:
        # Delete Custom Password Instructions by page ID
        
        api_instance.delete_custom_password_instructions(page_id, )
        
        # Below is a request that includes all optional parameters
        # api_instance.delete_custom_password_instructions(page_id, locale)
    except Exception as e:
        print("Exception when calling CustomPasswordInstructionsApi->delete_custom_password_instructions: %s\n" % e)

[Back to top]

get-custom-password-instructions

Get Custom Password Instructions by Page ID This API returns the custom password instructions for the specified page ID. A token with ORG_ADMIN authority is required to call this API.

API Spec

Parameters

Param Type Name Data Type Required Description
Path page_id str True The page ID of custom password instructions to query.
Query locale str (optional) The locale for the custom instructions, a BCP47 language tag. The default value is \"default\".

Return type

CustomPasswordInstruction

Responses

Code Description Data Type Response headers
200 Reference to the custom password instructions. CustomPasswordInstruction -
400 Client Error - Returned if the request body is invalid. ErrorResponseDto -
403 Forbidden - Returned if the user you are running as, doesn't have access to this end-point. ErrorResponseDto -
404 Not Found - returned if the request URL refers to a resource or object that does not exist ErrorResponseDto -
500 Internal Server Error - Returned if there is an unexpected error. ErrorResponseDto -

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

Example

import sailpoint.beta
from sailpoint.beta.models.custom_password_instruction import CustomPasswordInstruction
from sailpoint.beta.rest import ApiException
from pprint import pprint

    page_id = 'mfa:select' # str | The page ID of custom password instructions to query. # str | The page ID of custom password instructions to query.
    locale = 'locale_example' # str | The locale for the custom instructions, a BCP47 language tag. The default value is \\\"default\\\". (optional) # str | The locale for the custom instructions, a BCP47 language tag. The default value is \\\"default\\\". (optional)

    try:
        # Get Custom Password Instructions by Page ID
        
        api_response = api_instance.get_custom_password_instructions(page_id, )
        
        # Below is a request that includes all optional parameters
        # api_response = api_instance.get_custom_password_instructions(page_id, locale)
        print("The response of CustomPasswordInstructionsApi->get_custom_password_instructions:\n")
        pprint(api_response)
    except Exception as e:
        print("Exception when calling CustomPasswordInstructionsApi->get_custom_password_instructions: %s\n" % e)

[Back to top]