Fabric is Generally Available. Browse Fabric Presentations. Work towards your Fabric certification with the Cloud Skills Challenge.
I'm attempting to use the https://wabi-canada-central-redirect.analysis.windows.net/metadata/dataflows/settings/{dataflow GUID... API, but I'm having issues with the access token. I can make the API work if I get the token from any of the API that's ran on PBI Online using Chrome's network Developer Tool and also using the access token from Powershell cmdlet Get-PowerBIAccessToken.
I'm unable to use an OAuth2 access token for an application already registered on AzureAD. I keep getting a 401 Unauthorized. I'm missing somthing, but I don't know what. I could be missing a scope possibly?
I'm currently doing testing using Postman.
I can provide more infomation if needed. Just let me know.
Any help would be greatly appreciated.
Solved! Go to Solution.
You are correct, that API call is not exposed. Please vote for the idea.
Update
The API works. I've been using the API for over a year to handle automated dataflow gateway binding in various applications.
Rough Outline
To get the access token to use for the API you'll need a couple things to get it through the Microsoft.Identity.Client.
Run API
Update
The API works. I've been using the API for over a year to handle automated dataflow gateway binding in various applications.
Rough Outline
To get the access token to use for the API you'll need a couple things to get it through the Microsoft.Identity.Client.
Run API
I should note that I created a .NET app that manages various aspects of Power BI. I'm using the token from Get-PowerBIAccessToken Powershell cmdlet, using my credentials, to run the dataflow gateway binding API. It works fine for me. If another user uses the gateway binding functionality for dataflows that they cloned, it doesn't work, presumibly because the token is for my user and the dataflow owner is the app user.
My goal is to ditch the Powershell script and move the token generation into the application so any user can use the "hidden" Power BI REST API.
Apart from the URL being iffy (you should really be using the standard REST API URL) this usually works. Which auth method did you specify? client_credentials, password, something else?
I'm using grant_type = password for the authentication.
The standard REST API URL doesn't have/expose the dataflow gateway binding functionality, which is why I'm having to use "https://wabi-canada-central-redirect.analysis.windows.net".
I found the URL while looking at the REST API that Power BI Online was running.
Tenant is located in canada, hence the URL.
Please use the standard URL and the standard authentication method (OAUTH2 -> bearer token). I highly doubt it will let you authentiate via password.
Getting an access token works fine.
Using the token works fine for the Power BI REST API.
Using the token to run the API that binds dataflows to gateways doesn't work.
The gateway binding API will work if I use the token that PBI Online is using.
I'd love to use the standard request URL for dataflow gateway binding, but it doesn't exists. Happy to be wrong about that, though.
I should note that the Powershell cmdlet Get-PowerBIAccessToken generates a token that works with the dataflow gateway binding API.
You are correct, that API call is not exposed. Please vote for the idea.
Check out the November 2023 Power BI update to learn about new features.
Read the latest Fabric Community announcements, including updates on Power BI, Synapse, Data Factory and Data Activator.