Forum Discussion

Zed101's avatar
Zed101
Frequent Visitor
3 years ago
Solved

Error: Generate token request for proxy model should include the core model ID

Trying to use RLS with PowerBi embedded analytics, when I tested a POST request to generate token: POST https://api.powerbi.com/v1.0/myorg/GenerateToken I'm receiving following error: { "error...
  • Anonymous's avatar
    Anonymous
    3 years ago

    Hi,

     

    i was able to solve it.

     

    a report is using at least one dataset (= proxy model). If that dataset is referring to other datasets (= core model) then these need to be mentioned all in the generate embeded token request.

     

    eg

                                                            

    report1 -> dataset1 (proxy model) -> dataset2 (core model), dataset3 (core model)

     

    then the request should contain dataset1 id, dataset2 id and dataset3 id.

     

    these additional datasets (core models) should be added as a normal dataset (so a separate dataset object iso a modelid inside the existing one)

    {
    "accessLevel": "View",
    "allowSaveAs": "false",
    "datasetId": "<dataset ID>",
    "identities": [ ... ],
    "datasets": [
    {
    "id": "<dataset1 ID>",
    ...
    },{
    "id": "<dataset2 ID>",
    ...
    },{
    "id": "<dataset3 ID>",
    ...
    }
    ]
    }

     Hope this helps

     

    regards