cancel
Showing results for 
Search instead for 
Did you mean: 

Dynamic RLS - CUSTOMDATA field can only contain 256 characters during Embed Token generation

Hello,

 

When working with the embed token generation and the customdata field, we encountered a limitation of 256 characters for the customdata field.
If the field is bigger, the token generation is failing.

 

For our RLS business needs, we would like to filter on several fields, with several values and it is exceeding 256 characters.

 

1) Is there another way to achieve secure dynamic RLS filtering in a different way than using customdata field ?

 

Here is what is stated in the documentation but I would like to double check: "The only way to have dynamic RLS (which uses dynamic values for filter evaluation) in Azure Analysis Services, is using the CUSTOMDATA() function."

 

2) Is there plans to improve the customdata field in the token ? For example, making it bigger and/or allow several fields instead of just one.
I would even consider this a bug since the field is defined as a string in the documentation.

 

My suggestion, as an example, would be to use 5 fields of 2048 characters:

 

{
    "accessLevel": "View",
    "identities": [
        {
            "username": "EffectiveIdentity",
            "roles": [ "Role1", "Role2" ],
            "customData": [
                {
                    "field":"MyField1",
                    "data":"MyCustomDataForMyField1UpTo2048Chars"
                },
                {
                    "field":"MyField2",
                    "data":"MyCustomDataForMyField2UpTo2048Chars"
                },
                {
                    "field":"MyField3",
                    "data":"MyCustomDataForMyField3UpTo2048Chars"
                },
                {
                    "field":"MyField4",
                    "data":"MyCustomDataForMyField4UpTo2048Chars"
                },
                {
                    "field":"MyField5",
                    "data":"MyCustomDataForMyField5UpTo2048Chars"
                }
            ],
            "datasets": [ "fe0a1aeb-f6a4-4b27-a2d3-b5df3bb28bdc" ]
        }
    ]
}

 

Then from DAX, call CUSTOMDATA("MyField1") for example to retrieve "MyCustomDataForMyField1UpTo2048Chars".

 

Thanks and regards,

Benoit Arista

Status: New
Comments
Moderator

Hi @benoit-arista

 

I would suggest you create a support ticket to get help. 

 

Support Ticket.gif

 

Best Regards,
Qiuyun Yu