Announcing the Saviynt Knowledge Exchange unifying the Saviynt forums, documentation, training,
and more in a single search tool across platforms. Read the announcement here.

Create dynamic attribut via API

Antoine
New Contributor III
New Contributor III

Hello,

We would like to create a dynamic attribut with the Savynt's API.

We try to create a da with a  SQL query 
 
We got a http code 401 with the message " Operation not allowed as you are entering a value that resembles or contains SQL query" 
 
I think that operation is not alllowed for security concern
 
Could uou confirm we are not able to add a query in the payload of the createDynamicAttribut's API ?
We have to update it manually in the admin console.
 
Thanks
Regards
Antoine
7 REPLIES 7

CR
Regular Contributor III
Regular Contributor III

share DA payload


Thanks,
Raghu
If this reply answered your question, Please Accept As Solution and hit Kudos.

Antoine
New Contributor III
New Contributor III

You can find below  my payload

PremMahadikar
Regular Contributor III
Regular Contributor III

Hi @Antoine ,

Try passing below JSON code, it will work:

 

{
    "securitysystem": "Teamtest",
    "endpoint": "Teamtest",
    "updateuser": "admin",
    "dynamicattributes": [
        {
            "accountscolumn": "customproperty1",
            "hideoncreate": "false",
            "attributegroup": "group",
            "orderindex": "1",
            "requesttype": "ACCOUNT",
            "actionstring": "action string",
            "editable": "true",
            "attributename": "air97",
            "hideonupdate": "false",
            "actiontoperformwhenparentattributechanges": "",
            "defaultvalue": "default",
            "attributelable": "dyn attr label",
            "required": "false",
            "attributetype": "SINGLE SELECT FROM SQL QUERY",
            "regex": "",
            "attributevalue": "select distinct entitlement_value as 'ID', description as 'inlinedescription'  from entitlement_values  where ENTITLEMENTTYPEKEY ='123'",
            "showonchild": "false",
            "Parentattribute": "parent",
            "descriptionascsv": "desc"
        }
    ]
}

 

 

If this reply answers your question, please consider selecting Accept As Solution and hit kudos.

Same issue with your payload

error message "Operation not allowed as you are entering a value that resembles or contains SQL query"
 
When I set the attributvalue to an empty value , the creation operation is successfull.

CR
Regular Contributor III
Regular Contributor III

it will work share payload


Thanks,
Raghu
If this reply answered your question, Please Accept As Solution and hit Kudos.

PremMahadikar
Regular Contributor III
Regular Contributor III

@Antoine ,

I think it's because of the version 5.5 SP 3.X 

This could be a bug in the previous versions and was fixed in 23.7 from the screenshot. Please upgrade the version, it works!

PremMahadikar_0-1710326166299.png

Link

 

Antoine
New Contributor III
New Contributor III

Yes you are right. I tried on my 24.1 sandbox and it works fine.

This issue occured on my 5.5 SP5

Thanks for your help