Quantcast
Channel: Developer topics
Viewing all articles
Browse latest Browse all 17884

GenerateToken REST API returns 400 if I include customData

$
0
0

Dear all,

I am developing a proof-of-concept Javascript app to test RLS with customdata (i.e., the app owns data scenario).

I have a model deployed on an on-premises Analysis Service server accessible through an on-premises gateway. Such a model is accessed by a PowerBI report (live connection) which is successfully published on a custom workspace (say "Workspace A") on app.powerbi.com. If I try to embed the report on the javascript app without specifying any custom data, I can succesfully get the embed token by POSTing to the ..../GenerateToken REST API, but if I try to specify any customData I get the following 400 error (redacted):

"error": {
      "code": "InvalidRequest",
      "message": "Dataset 3....e doesn't support providing CustomData in effective identity"
}

The api call is:

          `/groups/${workspaceId}/reports/${reportId}/GenerateToken`,
          {
            method: 'POST',
            data: {
              "accessLevel": "View",
              'identities': [
                {
                  username: "myusername",
                  customData: 'some string',
                  roles: ["examplerolename"],
                  datasets: ["report_dataset_id"],
                },
              ]
            }
          })

Does anyone know what I am doing wrong?

Thanks for your support!


Viewing all articles
Browse latest Browse all 17884

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>