Hi
We have built the below workflow to grant access profiles like the below condition matches.
1st condition: if the access profile name and title match, grant access profile-
Example - access profile start with CC Base and identity attribute title Executive grant access profile CC Base Executive
2nd condition - if the access profile name and jobCategoryDesc and departmentName match, grant access profile-
Example - access profile stats with CC Base and identity attribute jobCategoryDesc Program Coordinator and departmentName IT grant access profile CC Base Program Coordinator IT
3rd condition - if the access profile name and jobCategoryDesc and DeptType and loccodedecs matches, grant access profile-
Likewise, we have seven conditions. I have built the below workflow, but it is not working as expected for some reason.
Any better suggestion?
{
"name": "Multiple Access Profile Grant Access",
"description": "Multiple Access Profile Grant EPIC Access",
"modified": "2024-08-22T03:57:50.04916704Z",
"modifiedBy": {
"type": "IDENTITY",
"id": "3b8c0332ff9d09a81f",
"name": "PKumar"
},
"definition": {
"start": "Compare Strings",
"steps": {
"Compare Strings": {
"choiceList": [
{
"comparator": "StringEquals",
"nextStep": "Get Access",
"variableA.$": "$.trigger.attributes.ADAccountExist",
"variableB": "YES"
}
],
"defaultStep": "End Step - Failure 1",
"displayName": "",
"type": "choice"
},
"End Step - Failure": {
"displayName": "",
"failureName": "Both access profile are null",
"type": "failure"
},
"End Step - Failure 1": {
"displayName": "",
"type": "failure"
},
"End Step - Success": {
"displayName": "",
"type": "success"
},
"Get Access": {
"actionId": "sp:access:get",
"attributes": {
"accessprofiles": true,
"entitlements": false,
"getAccessBy": "searchQuery",
"query": "name.exact:\"CC Base {{$.trigger.attributes.title}}\"",
"roles": false
},
"displayName": "",
"nextStep": "Verify Data Type",
"type": "action",
"versionNumber": 1
},
"Get Access 1": {
"actionId": "sp:access:get",
"attributes": {
"accessprofiles": true,
"entitlements": false,
"getAccessBy": "searchQuery",
"identityToReturn.$": "$.trigger.attributes.jobCategoryDesc",
"query": "name.exact:\"CC Base {{$.trigger.attributes.jobCategoryDesc}} {{$.trigger.attributes.departmentName}}\"",
"roles": false
},
"description": null,
"displayName": "",
"nextStep": "Verify Data Type 2",
"type": "action",
"versionNumber": 1
},
"Get Access 2": {
"actionId": "sp:access:get",
"attributes": {
"accessprofiles": true,
"entitlements": false,
"getAccessBy": "searchQuery",
"identityToReturn.$": "$.trigger.attributes.jobCategoryDesc",
"query": "name.exact:\"CC Base {{$.trigger.attributes.jobCategoryDesc}} {{$.trigger.attributes.departtype}}\"",
"roles": false
},
"description": null,
"displayName": "",
"nextStep": "Verify Data Type 1",
"type": "action",
"versionNumber": 1
},
"Get Access 3": {
"actionId": "sp:access:get",
"attributes": {
"accessprofiles": true,
"entitlements": false,
"getAccessBy": "searchQuery",
"identityToReturn.$": "$.trigger.attributes.jobCategoryDesc",
"query": "name.exact:\"CC Base {{$.trigger.attributes.jobCategoryDesc}} {{$.trigger.attributes.DeptType}} {{$.trigger.attributes.loccodedecs}}\"",
"roles": false
},
"description": null,
"displayName": "",
"nextStep": "Verify Data Type 3",
"type": "action",
"versionNumber": 1
},
"Manage Access": {
"actionId": "sp:access:manage",
"attributes": {
"addIdentities.$": "$.trigger.identity.id",
"comments": "This identity has access profile of given title",
"requestType": "GRANT_ACCESS",
"requestedItems.$": "$.getAccess.accessItems"
},
"displayName": "",
"nextStep": "Get Access 1",
"type": "action",
"versionNumber": 1
},
"Manage Access 1": {
"actionId": "sp:access:manage",
"attributes": {
"addIdentities.$": "$.trigger.identity.id",
"comments": "Jobcategory description ap is present",
"requestType": "GRANT_ACCESS",
"requestedItems.$": "$.getAccess1.accessItems"
},
"displayName": "",
"nextStep": "Get Access 2",
"type": "action",
"versionNumber": 1
},
"Manage Access 2": {
"actionId": "sp:access:manage",
"attributes": {
"addIdentities.$": "$.trigger.identity.id",
"comments": "Jobcategory description ap is present",
"requestType": "GRANT_ACCESS",
"requestedItems.$": "$.getAccess1.accessItems"
},
"displayName": "",
"nextStep": "Get Access 3",
"type": "action",
"versionNumber": 1
},
"Manage Access 3": {
"actionId": "sp:access:manage",
"attributes": {
"addIdentities.$": "$.trigger.identity.id",
"comments": "Jobcategory description ap is present",
"requestType": "GRANT_ACCESS",
"requestedItems.$": "$.getAccess1.accessItems"
},
"displayName": "",
"nextStep": "End Step - Success",
"type": "action",
"versionNumber": 1
},
"Verify Data Type": {
"choiceList": [
{
"comparator": "IsPresent",
"nextStep": "Manage Access",
"variableA.$": "$.getAccess.accessItems"
}
],
"defaultStep": "Get Access 1",
"displayName": "",
"type": "choice"
},
"Verify Data Type 1": {
"choiceList": [
{
"comparator": "IsPresent",
"nextStep": "Manage Access 2",
"variableA.$": "$.getAccess1.accessItems"
}
],
"defaultStep": "Get Access 3",
"displayName": "",
"type": "choice"
},
"Verify Data Type 2": {
"choiceList": [
{
"comparator": "IsPresent",
"nextStep": "Manage Access 1",
"variableA.$": "$.getAccess1.accessItems"
}
],
"defaultStep": "Get Access 2",
"displayName": "",
"type": "choice"
},
"Verify Data Type 3": {
"choiceList": [
{
"comparator": "IsPresent",
"nextStep": "Manage Access 3",
"variableA.$": "$.getAccess1.accessItems"
}
],
"defaultStep": "End Step - Failure",
"displayName": "",
"type": "choice"
}
}
},
"creator": {
"type": "IDENTITY",
"id": "3b8a810f47aa54dac0",
"name": "PKumar"
},
"trigger": {
"type": "EVENT",
"attributes": {
"id": "idn:identity-created"
}
}
}