cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
XiaodongLiang
New Member

ModelRefreshFailed_CredentialsNotSpecified when Refresh DataSet

Hi,

 

I have a report with Cosmos as data source. After some data of Cosmos change, I want to force a refresh for PBI report updates. 

 

Post 

https://api.powerbi.com/v1.0/myorg/groups/{{groupId}}/datasets/{{datasetId}}/refreshes

it returns 202.

while by 

GET 

https://api.powerbi.com/v1.0/myorg/groups/{{groupId}}/datasets/{{datasetId}}/refreshes

the history tells the error below:

 

 

{
      "id": 225716337,
      "refreshType": "ViaApi",
      "startTime": "2019-10-14T08:48:15.39Z",
      "endTime": "2019-10-14T08:48:15.453Z",
      "serviceExceptionJson": "{\"errorCode\":\"ModelRefreshFailed_CredentialsNotSpecified\"}",
      "status": "Failed",
      "requestId": "65b98616-85fd-4535-a978-d9ff2ca9764c"
    }

The token is prcoceeded by the steps:

 

 

1. get openId token by 

https://login.microsoftonline.com/common/oauth2/token

payload:

headers: 
   {  
     Authorization: 'Bearer {{openid token}}
}
form: 
   { client_id: '{{my client id}}',
     scope: 'openid',
     resource: 'https://analysis.windows.net/powerbi/api',
     username: '{{my account name}}',
     password: '{{my password}}',
     grant_type: 'password'
 }

2. get access token of dataset:

 

https://api.powerbi.com/v1.0/myorg/groups/{{groupId}}/datasets/{{datasetId}}/GenerateToken

header:

headers: 
   { 
     Authorization: 'Bearer {{openid token}}
}

Could you check what I missed? Thank you!

1 ACCEPTED SOLUTION

Accepted Solutions
XiaodongLiang
New Member

Re: ModelRefreshFailed_CredentialsNotSpecified when Refresh DataSet

I figured out myself. It is because the Cosmos key was input with desktop PowerBI only. While Refresh API will take advantage of PowerBI on-line (https://app.powerbi.com/),  which has not key input. After providing it, Refresh API started to run, though not sure it can succeed finally. Will see

View solution in original post

1 REPLY 1
XiaodongLiang
New Member

Re: ModelRefreshFailed_CredentialsNotSpecified when Refresh DataSet

I figured out myself. It is because the Cosmos key was input with desktop PowerBI only. While Refresh API will take advantage of PowerBI on-line (https://app.powerbi.com/),  which has not key input. After providing it, Refresh API started to run, though not sure it can succeed finally. Will see

View solution in original post

Helpful resources

Announcements
New Ranks Launched March 24th!

New Ranks Launched March 24th!

The time has come: We are finally able to share more details on the brand-new ranks coming to the Power BI Community!

‘Better Together’ Contest Finalists Announced!

‘Better Together’ Contest Finalists Announced!

Congrats to the finalists of our ‘Better Together’-themed T-shirt design contest! Click for the top entries.

Arun 'Triple A' Event Video, Q&A, and Slides

Arun 'Triple A' Event Video, Q&A, and Slides

Missed the Arun 'Triple A' event or want to revisit it? We've got you covered! Check out the video, Q&A, and slides now.

Join THE global Microsoft Power Platform event series.

Join THE global Power Platform event series.

Attend for two days of expert-led learning and innovation on topics like AI and Analytics, powered by Dynamic Communities.

Community Summit North America

Community Summit North America

Innovate, Collaborate, Grow. The top training and networking event across the globe for Microsoft Business Applications

Top Solution Authors