I have to Create account with entitlement from request center. However the request is successful but the entitlement is going null and there is no record created in entitlement table but account is created. But when hardcoded - it does create entry in bot user and entitlement table.
This is the body I used:
{
“uid”: “$plan.nativeIdentity$”,
“firstName”: “$plan.firstName$”,
“lastName”: “$plan.lastName$”,
“ibus”: [
“ADM”
],
“roles”: [
“$plan.roles$”
],
“lastLogin”: “$plan.lastLogin$”,
“isActive”: true,
}
I have selected Create Account With “Ent” Request.
The plan.roles variable does not seem to be getting populated correctly.
I have also tried $plan.memberOf.roles$ instead of $plan.roles$
Any help is appreciated.
Also I need to pass second entitlement ibus field where I have hard coded “ADM” in my body from request center. Can this be done without rule ?
check what attribute you have configured in your Webservice Entitlement types and ensure to use the same attribute which you have configured as “Entitlement ID” i.e. you need to pass Entitlement ID in your create body.
{
“uid”: “$plan.nativeIdentity$”,
“firstName”: “$plan.firstName$”,
“lastName”: “$plan.lastName$”,
“ibus”: $plan.ibus$,
“roles”: $plan.roles$,
“lastLogin”: “$plan.lastLogin$”,
“isActive”: true
}
make sure that in provisioning form all values are present
[] might be causing the issue here. If roles is a multivalued type and multiple roles are requested at a time, plan.roles will be in the form of an array and additional [] in your body will be causing the issue.
You would need a BeforeOperation rule to check if the roles is of type List or String and accordingly update the body of your request
1.Make sure that the Access Profile (for roles/entitlements) is properly mapped to the application entitlements.
2.If you’re requesting an Access Profile in the Request Center and expecting it to populate plan.roles, make sure the Access Profile includes entitlements with role as the entitlement type.
3.Review the Request Center to Account Request Mapping
4.Ensure you are mapping the entitlement properly in the Account Create form, i.e., plan.roles should match the exact entitlement attribute name.
5.Try validating the format. Don’t use quotes around the variables if they resolve to arrays. Wrapping them in quotes turns them into a string.
4. Logging/Debugging the Plan
You can log the plan using debug rules or inside your connector logic to inspect what’s being passed.
yes. unchecking multivalued for entitlement in schema fixed the issue. But it is not pulling all the entitlements. So as you mentioned I’m using BeforeOperation Rule to check how it is added in the payload. But it is not printing any logs in ccg.log.
This usually happens when the entitlement in the request isn’t properly linked to the source or access profile. Check if Verify Entitlement is Aggregated, Ensure It’s Linked, Request Format, Case Sensitivity,
Test with ID. Check and let me know