Has anyone done an integration with PowerBI? We would like to allow each org (represented as a Project) to setup their own data analytics thru PowerBI/PowerQuery. We've considered letting them query via the FHIR API to get some aggregate metrics. However, they receive an authentication error when trying to add a PowerBI source. We've attempted:
A. creating a medplum ClientApplication to generate a Secret, then the org enters the Secret as a key in PowerBI's connector
B. curling oauth2/token/ to receive a bearer token and entering that as Authorization in the Headers of a Web API connector (
https://learn.microsoft.com/en-us/power-query/connectors/web/web#load-web-data-using-an-advanced-url)
Are we going about it wrong? Or is there an alternative for letting 3rd parties like PowerBI authenticate and connect to the FHIR API?
Note: We don't want to let a PowerBI user connect directly to the (replica) db because that gives them access to all Projects, not just their own.