Skip to main content

Table of Contents

Adding custom error messages in a post-authentication activity


Only available versions of this content are shown in the dropdown

Default error messages in a post-authentication activity can be customized to provide users with more specific, helpful feedback. You can set custom error messages based on the post-authentication logic.

Before you can add custom error messages in a post-authentication activity, you must first create an authentication service. For more information, see Creating an authentication service.
  1. In the navigation pane of DevStudio, click Records > Data Model > Field Value .

  2. Click Create.

  3. In the Label field, enter a label for this message, for example, customErrorMsgByMe.

  4. In the Field Name field, enter pyMessageLabel.

  5. In the Context section, set the Apply to field to @baseclass, and then click Create and open.

  6. In the To field, enter the custom error message that you want to display when this error occurs.

  7. Click Save.

  8. In the navigation pane of Dev Studio, click Records > SysAdmin > Authentication Service , and then click the authentication service that you previously created.

  9. In the Advanced Configuration Settings section, you can select the previously created custom activity. If you have not created one, you could create a new one based on the OOTB activity pySSOPostAuthenticationActivity.

  10. Click the Configure icon next to the Post-authentication activity field, and then

    if creating a new activity, click Create and open
    if copying the OOTB activity, click Save As
  11. Set the Method field to Java.

  12. Click the Method Parameters section, and then in the Java Source field, set the value of pyPostAuthErrorFieldLabel to tools.getParameterPage().putParamValue("pyPostAuthErrorFieldLabel", "<custom field value name>").

    tools.getParameterPage().putParamValue("pyPostAuthErrorFieldLabel", "customErrorMsgByMe")
Did you find this content helpful?

Have a question? Get answers now.

Visit the Collaboration Center to ask questions, engage in discussions, share ideas, and help others.

Ready to crush complexity?

Experience the benefits of Pega Community when you log in.

We'd prefer it if you saw us at our best.

Pega Community has detected you are using a browser which may prevent you from experiencing the site as intended. To improve your experience, please update your browser.

Close Deprecation Notice
Contact us