Forum Discussion

tcouey's avatar
tcouey
Frequent Visitor
2 years ago
Solved

Getting web data via api and authorization token

Hi

 

I am using an api authorization token generated from one of our vendor websites. I then use an api endpoint, and the authorization header/token to pull our data from the vendor into powerbi desktop. 

 

Is it possible to then distribute this data within a report based off of the one users connection to the api end point? The user with the token, only gets the token within the vendor site after whitelisting their ip address within the vendor tool.

 

My questions are, if possible how can I create a job/schedule to sync the data, and if it's possible to then share this report to numerous users outside of the venor tool.

 

Thank you for any help

  • Anonymous's avatar
    Anonymous
    2 years ago

    Hi tcouey ,

     

    Powerbi supports setting the format of its request headers when connecting to a web data source.
    If you need to provide an API authorization token when connecting to a web data source, you can add the header in the advance option.
    The Bearer your_api_token_here section is the value of the Authorization header, where Bearer is a common authentication scheme followed by the actual API token.

     

    For more details, you can refer to below document:

    Connect to a webpage from Power BI Desktop - Power BI | Microsoft Learn

    Power Query Web connector - Power Query | Microsoft Learn

     

    Best Regards,
    Adamk Kong

     

    If this post helps, then please consider Accept it as the solution to help the other members find it more quickly

     

4 Replies

  • Anonymous's avatar
    Anonymous
    Not applicable

    Hi tcouey ,

     

    Powerbi supports setting the format of its request headers when connecting to a web data source.
    If you need to provide an API authorization token when connecting to a web data source, you can add the header in the advance option.
    The Bearer your_api_token_here section is the value of the Authorization header, where Bearer is a common authentication scheme followed by the actual API token.

     

    For more details, you can refer to below document:

    Connect to a webpage from Power BI Desktop - Power BI | Microsoft Learn

    Power Query Web connector - Power Query | Microsoft Learn

     

    Best Regards,
    Adamk Kong

     

    If this post helps, then please consider Accept it as the solution to help the other members find it more quickly

     

    • tcouey's avatar
      tcouey
      Frequent Visitor

      Thanks for the assist Adamk! 

       

      I'm able to connect properly and can see all my needed tables from the api endpoint. 

       

      Do you have any suggestions on ways to keep this data sync updated when publishing to a workspace for endusers to view?

       

  • Hi
    I also want to use Token Authentication for a semantic model in Power BI Service. 
    Creating it with Power BI Desktop is OK as said Anonymous, I used the Authorization header.

    But when publishing it on my workspace in app.powerbi.com, I can't use Gateway Datasource to schedule refresh because it seems that On-premise Gateway Datasource Web only supports Anonymous or Basic Auth ?
    Is there any workaround ?
    Best regards,
    BenoitB