Skip to content

Instantly share code, notes, and snippets.

@krishnaanaril
Created October 5, 2018 10:17
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save krishnaanaril/427e4ef6b171fa109787617b3c0e6953 to your computer and use it in GitHub Desktop.
Save krishnaanaril/427e4ef6b171fa109787617b3c0e6953 to your computer and use it in GitHub Desktop.
Calling Power BI API to get reports in group
public getReportsInGroup(groupId: 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}/reports`, { headers: headers });
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment