Idira Identity: All Idira Identity roles a user belongs to is sending to AWS when launching AWS SAML app
83
Created On 11/10/26 11:02 AM - Last Modified 11/10/26 12:59 PM
Question
When a user launches the AWS SAML app in CyberArk Identity User Portal, all CyberArk Identity roles the user belongs to is showing on the AWS page for selection as below:
Is there any way to show only any AWS-related role?
Environment
Identity App Access Service
Answer
This is the sample script that administrators can use to filter out the non-AWS roles:
var roleNames = LoginUser.RoleNames;
var attrArray = new Array();
var accountNumber = CorpIdentifier.replace(/[- ]/g, '');
for (var i=0; i < roleNames.Length; i++)
{
if (roleNames[i].indexOf("AWS") != -1) {
var v = 'arn:aws:iam::' + accountNumber + ':role/' + roleNames[i] + ',arn:aws:iam::' + accountNumber + ':saml-provider/' + DefaultAwsSsoProviderName;
attrArray.push(v);
}
}
setAttributeArray('https://aws.amazon.com/SAML/Attributes/Role';, attrArray);Additional Information
Details
Question:
When a user launches the AWS SAML app in CyberArk Identity User Portal, all CyberArk Identity roles the user belongs to is showing on the AWS page for selection as below:
Is there any way to show only any AWS-related role?
Answer:
This is the sample script that administrators can use to filter out the non-AWS roles:
var roleNames = LoginUser.RoleNames;
var attrArray = new Array();
var accountNumber = CorpIdentifier.replace(/[- ]/g, '');
for (var i=0; i < roleNames.Length; i++)
{
if (roleNames[i].indexOf("AWS") != -1) {
var v = 'arn:aws:iam::' + accountNumber + ':role/' + roleNames[i] + ',arn:aws:iam::' + accountNumber + ':saml-provider/' + DefaultAwsSsoProviderName;
attrArray.push(v);
}
}
setAttributeArray('https://aws.amazon.com/SAML/Attributes/Role', attrArray);