Skip to content

Instantly share code, notes, and snippets.

@krishnaanaril
Created October 5, 2018 10:29
Show Gist options
  • Save krishnaanaril/60ed55af5b583142f5c6b5a77e999d8f to your computer and use it in GitHub Desktop.
Save krishnaanaril/60ed55af5b583142f5c6b5a77e999d8f to your computer and use it in GitHub Desktop.
Calling Power BI API to get tiles in group
public getTilesInGroup(groupId: string, dashboardKey: string){
const headers = new HttpHeaders({
'Content-Type': 'application/json',
'Authorization': `Bearer ${this._context.getCachedToken(environment.powerBIEndpoint)}`
});// this._context is the ADAL AuthenticationContext object
return this.http.get(`https://api.powerbi.com/v1.0/myorg/groups/${groupId}/dashboards/${dashboardKey}/tiles`, { headers: headers });
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment