How to log into a SAML application with a different username than the user's Idira username

How to log into a SAML application with a different username than the user's Idira username

101
Created On 11/10/26 10:59 AM - Last Modified 11/10/26 15:50 PM


Objective


In some situations, a web application may require a different username than the username used to log into Idira Identity with. By default, the SAML application templates in Idira Identity will use either the user’s userprincipalname or email address as the username for logins. This article will go through several methods in Idira Identity for configuring an alternate username.
 


Environment


21.1;21.2;21.3;21.4;21.5;21.6;21.7;21.8;21.9;21.10;21.11;21.12;22.1;22.2;22.3;22.4;22.5;22.6 Identity App Access Service

Procedure


Method 1: Configuring User > Application Settings

  1. In the Admin Portal, go to Core Services > Users, then click the user you want to configure. Go to Application Settings and click on Add.

Graphical user interface  Description automatically generated

  1. Select the web application that you want to use an alternate username for and click Save.
  2. Enter alternate username into the User Name field and click OK.

Graphical user interface, text, application, chat or text message  Description automatically generated

You will notice the User Name for the selected web application is different than the user’s CyberArk username.
Graphical user interface, application  Description automatically generated

This method can also be used to enter a predefined password unique to the end user, for non-SAML applications that uses a password for authentication.
 

Method 2: Using a username stored in Additional Attributes

Custom attributes can be created in CyberArk Identity by going to Settings > Customization > Additional Attributes and click Add.
Graphical user interface, table  Description automatically generated

The name must contain an underscore. Select Text for Type. Optionally select User Editable. User Editable enables the user to populate or edit this value through the User Portal > Account > Personal Profile > Additional Attributes. Click Add.
Graphical user interface, text, application, chat or text message  Description automatically generated
 

  1. To select the Additional Attribute value as a username, go to the Account Mapping section for the web application that will use an alternate username. Select Account Mapping Script.
  2. In the script field enter: LoginUser.Username = LoginUser.Get("name of the Additional Attribute");


For example, if the Additional Attribute field name is “Alt_username” then enter: LoginUser.Username = LoginUser.Get("Alt_username");
 

  1. Click Save.


There are 2 advantages for using Additional Attributes instead of user’s Application Settings.
1. Additional Attributes are included in the Bulk import csv and

2. Additional Attributes can optionally be editable by the end user.
 

Method 3: Customizing the username with Account Mapping Script

The Account Mapping Script field can also be used to username modifications for different use cases. Below are some common examples.

/* ==== Example #1: Append a different login domain to shortname. ====
In this example, the user's AD and email domain is different than the domain used in the username.

LoginUser.Username = LoginUser.Shortname +"@differentdomain.com"

==== Example #2: Prepend the domain name to the username =====
In this example, the desired username format is domain-name\username. (For example: CYBR\john)

LoginUser.Username = "domain\\" + LoginUser.Shortname;

==== Example #3: Shortname vs samaccountname =====
If you selected Directory Service Field and entered samaccountname into the field, it would work for AD users but not for CyberArk Directory users. The following script for Shortname will work for both AD and CyberArk Directory users. This script is probably the most commonly used.

LoginUser.Username = LoginUser.Shortname;
 



Actions
  • Print
  • Copy Link

    https://knowledgebase.paloaltonetworks.com/KCSArticleDetail?id=kA1hj0000000jy5CAA&lang=en_US&refURL=http%3A%2F%2Fknowledgebase.paloaltonetworks.com%2FKCSArticleDetail