We are delighted to share our new EIC Delivery Methodology for efficiently managing Saviynt Implementations and delivering quick time to value. CLICK HERE.

CreateAccountJson entitlement customproperty

Isyraf
New Contributor
New Contributor

Hi Team,

May I know how we to manually hard code the value into the entitlement custom property, then in our JSON want to retrieve the value from the customproperty. You can refer to the below json and attached picture.

Thank you,

Isyraf_0-1690426556127.png

CreateAccountJSON :
{
"accountIdPath": "accountName",
"dateFormat": "",
"responseColsToPropsMap": {
"customproperty8": "call1.message._links.self.href~#~char"
},
"call": [{
"name": "call1",
"connection": "userAuth",
"url": "https://test-rightcloud.maxis.com.my/api/v3/cmp/users/",
"httpMethod": "POST",
"httpContentType": "application/json",
"httpParams": "{\"firstName\":\"${user.firstname}\",\"lastName\":\"${user.lastname}\",\"email\": \"${user.email}\",\"username\": \"${arsTasks.accountName}\",\"superAdmin\": ${account.customproperty4},\"devopsAdmin\": ${account.customproperty5},\"globalViewer\": ${account.customproperty6},\"password\":\"SecurePass@12345\",\"passwordResetQuestion\": 1,\"passwordResetAnswer\": \"My Reset Answer\"}",
"httpHeaders": {
"Authorization": "${access_token}"
},
"successResponses": {
"message": "",
"statusCode": [201, 500]
}
}]
}

17 REPLIES 17

Isyraf
New Contributor
New Contributor

I got this error when I tried to run the task. The customproperty value cannot pass through. Please help me on this matter.

2023-07-20 08:08:23,465 [Thread-245] DEBUG rest.RestProvisioningService - Validating Password Policy and setting defaults...
2023-07-20 08:08:23,465 [Thread-245] DEBUG rest.RestProvisioningService - Total Call: 1
2023-07-20 08:08:23,465 [Thread-245] ERROR rest.RestProvisioningService - Exception in creating original http params:com.fasterxml.jackson.core.JsonParseException: Unrecognized token '$': was expecting ('true', 'false' or 'null')
at [Source: {"firstName":"${user.firstname}","lastName":"${user.lastname}","email": "${user.email}","username": "${arsTasks.accountName}","superAdmin": ${requestAccessAttributes.get('customproperty4')},"devopsAdmin": ${requestAccessAttributes.get('customproperty5')},"globalViewer": ${requestAccessAttributes.get('customproperty6')},"password":"SecurePass@12345","passwordResetQuestion": 1,"passwordResetAnswer": "My Reset Answer"}; line: 1, column: 142]

naveenss
All-Star
All-Star

Hi @@Isyra  entitlement properties cannot be accessed in the create account json. May I know the use case?

Regards,
Naveen Sakleshpur
If this reply answered your question, please click the Accept As Solution button to help future users who may have a similar problem.

Isyraf
New Contributor
New Contributor

Hi @naveenss ,

I want to fetch the value for 3 different entitlement customproperty. Is it possible. You may refer to the attached picture.

Isyraf_0-1690438414017.png

 

Hi @Isyraf ,

You can create dynamic attribute and fetch the values from these three entitlements in ARS while requesting the account. Then, you can use that dynamic attributes inside createaccount json. Assuming your account is assigned through request.

Let me know if it helps.


Pandharinath Mahalle(Paddy)
If this reply answered your question, please Accept As Solution to help other who may have a same problem. Give Kudos 🙂

Isyraf
New Contributor
New Contributor

Hi @pmahalle ,

Thank you for the response. May I know is it possible to fetch the values from these three entitlements without creating the dynamic attribute and just fetch it through the entitlement?

Isyraf
New Contributor
New Contributor

Hi @pmahalle ,

We dont want to use the dynamic attribute instead we want the customproperty for entitlement come from reconciliation. Is it possible

@Isyraf No, entitlement properties can not be accessed in create account json. Dynamic attribute is one of the option or you can try by keeping those values in endpoint custom properties.


Pandharinath Mahalle(Paddy)
If this reply answered your question, please Accept As Solution to help other who may have a same problem. Give Kudos 🙂

Isyraf
New Contributor
New Contributor

Hi @pmahalle ,

If we use Dynamic attribute, do we need to declare the customproperty in the create account json. here is my create account json, can you please take a look at this. I receive some error when I try to do request access.

CreateAccountJSON :
{
"accountIdPath": "accountName",
"dateFormat": "",
"responseColsToPropsMap": {
"customproperty8": "call1.message._links.self.href~#~char"
},
"call": [{
"name": "call1",
"connection": "userAuth",
"url": "https://test-rightcloud.maxis.com.my/api/v3/cmp/users/",
"httpMethod": "POST",
"httpContentType": "application/json",
"httpParams": "{\"firstName\":\"${user.firstname}\",\"lastName\":\"${user.lastname}\",\"email\": \"${user.email}\",\"username\": \"${arsTasks.accountName}\",\"superAdmin\": ${account.customproperty4},\"devopsAdmin\": ${account.customproperty5},\"globalViewer\": ${account.customproperty6},\"password\":\"SecurePass@12345\",\"passwordResetQuestion\": 1,\"passwordResetAnswer\": \"My Reset Answer\"}",
"httpHeaders": {
"Authorization": "${access_token}"
},
"successResponses": {
"message": "",
"statusCode": [201, 500]
}
}]
}

error:

[Yesterday 3:50 PM] Isyraf Ismail

2023-07-20 08:08:23,465 [Thread-245] DEBUG rest.RestProvisioningService - Validating Password Policy and setting defaults...
2023-07-20 08:08:23,465 [Thread-245] DEBUG rest.RestProvisioningService - Total Call: 1
2023-07-20 08:08:23,465 [Thread-245] ERROR rest.RestProvisioningService - Exception in creating original http params:com.fasterxml.jackson.core.JsonParseException: Unrecognized token '$': was expecting ('true', 'false' or 'null')
at [Source: {"firstName":"${user.firstname}","lastName":"${user.lastname}","email": "${user.email}","username": "${arsTasks.accountName}","superAdmin": ${requestAccessAttributes.get('customproperty4')},"devopsAdmin": ${requestAccessAttributes.get('customproperty5')},"globalViewer": ${requestAccessAttributes.get('customproperty6')},"password":"SecurePass@12345","passwordResetQuestion": 1,"passwordResetAnswer": "My Reset Answer"}; line: 1, column: 142]

 

{
    "accountIdPath": "accountName",
    "dateFormat": "",
    "responseColsToPropsMap": {
        "customproperty8": "call1.message._links.self.href~#~char"
    },
    "call": [{
            "name": "call1",
            "connection": "userAuth",
            "url": "https://test-rightcloud.maxis.com.my/api/v3/cmp/users/",
            "httpMethod": "POST",
            "httpContentType": "application/json",
            "httpParams": "{\"firstName\":\"${user.firstname}\",\"lastName\":\"${user.lastname}\",\"email\": \"${user.email}\",\"username\": \"${arsTasks.accountName}\",\"superAdmin\": \"${account.customproperty4}\",\"devopsAdmin\": \"${account.customproperty5}\",\"globalViewer\": \"${account.customproperty6}\",\"password\":\"SecurePass@12345\",\"passwordResetQuestion\": 1,\"passwordResetAnswer\": \"My Reset Answer\"}",
            "httpHeaders": {
                "Authorization": "${access_token}"
            },
            "successResponses": {
                "message": "",
                "statusCode": [201, 500]
            }
        }
    ]
}

@Isyraf  quotes were missing for some of the attributes. can you please try with the above JSON?

 

Regards,
Naveen Sakleshpur
If this reply answered your question, please click the Accept As Solution button to help future users who may have a similar problem.

Isyraf
New Contributor
New Contributor

Hi @naveenss ,

I already tried it and the previous error is gone but now got another error. @pmahalle said just now that the entitlement properties can not be accessed in create account json. Then it is not possible to have customproperty in create account right?

Yes. during the create acc json the account properties are still not populated.. Hence that's not possible. If you are trying to get the custom properties of entitlement values even that is not possible. Only values that are stored in the dynamic attributes are accessible in the create account json.

Regards,
Naveen Sakleshpur
If this reply answered your question, please click the Accept As Solution button to help future users who may have a similar problem.

Isyraf
New Contributor
New Contributor

Hi @naveenss , @pmahalle ,

Can we can fetch the customproperty value through add access json. We dont want to use dynamic attribute because we want to mapped this three flag (superAdmin, devopsAdmin, globalViewer) with the group, so user just need to choose the group and we based on which group user chosen and fill in the flag accordingly. Kindly assist on this.

Thank you,

Isyraf_0-1690515312011.png

 

${task.entitlement_valueKey.customproperty11}


Regards,
Rushikesh Vartak
If you find the response useful, kindly consider selecting Accept As Solution and clicking on the kudos button.

Isyraf
New Contributor
New Contributor

Hi @rushikeshvartak ,

Do we to point out which entitlement we want to fetch the data?

It will automatically managed by connector


Regards,
Rushikesh Vartak
If you find the response useful, kindly consider selecting Accept As Solution and clicking on the kudos button.

Isyraf
New Contributor
New Contributor

Hi @rushikeshvartak , @naveenss , @pmahalle ,

My connection already able to succesfully created an account but the customproperty value is different from what I set in the entitlement. Kindly assist me on this.

This is the new created account.

Isyraf_0-1691046439860.png

This is what I set in the entitlement.

Isyraf_1-1691046526967.png

Add access JSON :
{
"accountIdPath": "accountName",
"responseColsToPropsMap": {},
"call": [{
"name": "Role",
"connection": "userAuth",
"url": "https://test-xxxxxx.xxxxx.com.my/api/v3/cloudbolt/users/${account.customproperty8.substring(18,)}",
"httpMethod": "POST",
"httpContentType": "application/json",
"httpParams": "{\"passwordResetQuestion\": \"1\",\"passwordResetAnswer\": \"abcdefg\",\"superAdmin\": \"${task.entitlementValueKey.customproperty4}\",\"devopsAdmin\": \"${task.entitlementValueKey.customproperty5}\",\"globalViewer\": \"${task.entitlementValueKey.customproperty6}\",\"apiAccess\": \"${account.customproperty7}\"}",
"httpHeaders": {
"Authorization": "${access_token}"
},
"successResponses": {
"statusCode": [200]
}
}]
}

[This message has been edited to mask PII info from image by moderator]

Isyraf
New Contributor
New Contributor

May I know how can we check the configuration where is the value coming and pass into the account customproperty