Forum Discussion
Error: Generate token request for proxy model should include the core model ID
- Anonymous3 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
I tried it, receiving same error.
I have only one dataset with xmlaPermissions set to ReadOnly, hence the request thus formed had a structure like below (Also, replaced all placeholders below with real values)
{
"accessLevel": "View",
"allowSaveAs": "false",
"datasetId": "<dataset ID>",
"identities": [
{
"username": "<userName>",
"roles": [
"Default"
],
"datasets": [
"<dataset ID>"
]
}
],
"datasets": [
{
"id": "<dataset ID>",
"modelId": "<core model ID>",
"xmlaPermissions": "ReadOnly"
}
]
}
I was able to find the modelId, however passing it into the request the way as suggested above didn't work for me. Also, if you could examine the request structure for datasets array inside from https://learn.microsoft.com/en-us/rest/api/power-bi/embed-token/generate-token#generatetokenrequestv2dataset, you'd see there is no mention of modelId there. Still I tried but didn't work.
Hi, did you find the solution for this one?
- Zed1012 years agoFrequent Visitor
Yes. See BooaB solution in this page, dated 04-12-2023
- anambedoya2 years agoFrequent Visitor
Hi Zed101 I'm trying to make this request work but I'm getting this error. I saw in BooaB response he adviced to put the model id into a different dataset object but when I do that, I get that the dataset doesn't exist. I'm confused in that part 'since the modelId I'm using is a numeric value as the one you showed previously in a screenshot