All docs This doc
Skip to end of metadata
Go to start of metadata

To use the Power BI connector, add the <powerbi.init> element in your configuration before carrying out any other Power BI operations. 

The Power BI API  uses Azure Active Directory (Azure AD) to provide secure sign in and authorization. For more information, see https://msdn.microsoft.com/en-us/library/mt203565.aspx#intro.

init
<powerbi.init>
	<apiUrl>{$ctx:apiUrl}</apiUrl>
	<accessToken>{$ctx:accessToken}</accessToken>
</powerbi.init>
Properties
  • apiUrl: Base endpoint URL of  the Power BI API.
  • accessToken: OAuth Token to read and manipulate data of the Power BI API

Note

Add the following resources to the ESB registry.

  • /_system/governance/connectors/PowerBI/accessToken
  • /_system/governance/connectors/PowerBI/apiUrl       

  • /_system/governance/connectors/PowerBI/clientId

  • /_system/governance/connectors/PowerBI/clientSecret

  • /_system/governance/connectors/PowerBI/redirectUrl

  • /_system/governance/connectors/PowerBI/refreshToken

Note

getAccessTokenFromAuthorizationCode
<powerbi.getAccessTokenFromAuthorizationCode>
    <apiUrl>{$ctx:apiUrl}</apiUrl>
    <authorizationCode>{$ctx:authorizationCode}</authorizationCode>
	<resource>{$ctx:resource}</resource>
</powerbi.getAccessTokenFromAuthorizationCode>
Properties
  • apiUrl: The base endpoint URL of the Power BI API.
  • authorizationCode: Authorization code to be used to obtain the access token.
  • resource: The App ID URL of the web API. Optional.

When the getAccessTokenFromAuthorizationCode operation is executed, the new values will be updated to the accessToken and refreshToken registry entries.

Following is a sample REST/JSON request that can be handled by the getAccessTokenFromAuthorizationCode operation.

Sample Request for getAccessTokenFromAuthorizationCode
{
	"apiUrl" : "https://api.powerbi.com",
	"authorizationCode" : "AAABAAAAiL9Kn2Z27UubvWFPbm0gLRDV2MeRnUmoZPR_uB814M09EzzkA-eUChcQdpJ5JgXKDggl5FBS97Dp1utOdF4qXuQVUxFXe7_y_JSVc4qaZXCsv-LgUjXTmwBSNAY05NgDeuwSOgsvRp2eIpfBE9fpHBh8oREtaFw_vXMsOnBa_LI4qi6SCWy_YgFJ59uYHU3Gg8BmIzXke3UCaw2E4wUIa_z4hvYJYXrFAZTCDaFV55-srQHgPk6KHpk1kC511CMBGO3UYjU8mcuJgwsFWbLiYKDng6ySaxTwS_bAHz9wqvtEGW2UeALmjBDDp4sHBvNDEe15hxRy36vHKYkhV8Te9sCgDVfHyCReGh9SvQKICik_SbApO9_KuNKaX06Y7nRucQOW79z54SAA6VTv6QY1XP30bzlbjmMhZTbDQ9QPjjygcmk9QmfSMHFWCZxqD88MN1fNdPlfYT9Zry6FgCYZJO8pkr8GDLGmMueiNqlmCYGKoYda5JvKVQjjZsQjEZLn24r_0k9RRYuRNPX_j6lLGYxWAbHTUZrj9JTaOHEWO16Dh5mCg7fXTcT6cl4aTV9_RzCPpQbpwkGzqVw-JR11SnwCmsOgu_6rjJ6XrHLupTn0sFoTrz8I-ifHT6sSnz5r9y9qK5yYR3MH5Gb9UHAFMyAA",
	"resource" : "https://analysis.windows.net/powerbi/api"
}
Related Power BI documentation

https://msdn.microsoft.com/en-us/library/azure/dn645542.aspx

getAccessTokenFromRefreshToken
<powerbi.getAccessTokenFromRefreshToken>
    <apiUrl>{$ctx:apiUrl}</apiUrl>
	<resource>{$ctx:resource}</resource>
</powerbi.getAccessTokenFromRefreshToken>
Properties
  • apiUrl: The base endpoint URL of the Power BI API.
  • resource: The App ID URL of the web API. Optional.

When the getAccessTokenFromRefreshToken operation is executed, the new value will be updated to the accessToken registry entry.

Following is a sample REST/JSON request that can be handled by the getAccessTokenFromRefreshToken operation.

Sample Request for getAccessTokenFromRefreshToken
{
	"apiUrl" : "https://api.powerbi.com",
	"resource" : "https://analysis.windows.net/powerbi/api"
}
Related Power BI documentation

https://msdn.microsoft.com/en-us/library/azure/dn645542.aspx

Now that you have connected to Power BI, use the information in the following topics to perform various operations with the connector. 

  • No labels