Forum Discussion
Embedded - Accessing an external workspace
- 3 years ago
To connect to a customer's workspace via the Power BI REST API, your app would need to be added as a guest to the customer's tenant. Once the app has been added as a guest, you can use the OAuth 2.0 client credentials grant type for authentication. You would need to obtain the necessary client ID and secret from the customer's tenant. This information can be obtained from the Azure Active Directory in the customer's tenant, and is used to obtain an access token which is then used for making API requests. The customer would need to provide you with these credentials in order for your app to be able to access their workspace via the Power BI REST API.
Yes, it's possible to connect and authenticate against a customer's Power BI workspaces from your tenant's embedded capacity, but you need to make sure that your Azure app has been added as a guest to the customer's workspace with the necessary access.
To implement this, you can use the Power BI REST API to connect to the customer's workspaces and retrieve the necessary data. You will also need to implement an authentication mechanism, such as OAuth 2.0, to ensure that the customer's workspaces are accessed securely.
Here is some documentation that may be useful:
- Power BI REST API: https://docs.microsoft.com/en-us/rest/api/power-bi/
- Power BI Embedded Playground: https://aka.ms/pbembedplayground
- Power BI Embedded Samples: https://github.com/Microsoft/PowerBI-Developer-Samples
You can also find more information about Power BI Embedded and Azure Active Directory authentication in the following documentation:
- Power BI Embedded Authentication: https://docs.microsoft.com/en-us/power-bi/developer/embedded/authentication
- Azure Active Directory authentication for Power BI Embedded: https://docs.microsoft.com/en-us/azure/active-directory/develop/howto-add-app-to-tenant