Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
b_infinity_1
Regular Visitor

Enable Automatic Refresh with Basic Auth connection to an API

Hello! I have a report I am working on where I need to use the Azure Devops API to get Sprint Start and End dates. I successfully connected to the API in Power BI Desktop by using the Web connection method, choosing Basic Authentication, keeping the username blank and the using my API key as the password. This works perfectly in Power BI Desktop. Unfortunately, when the report was published to the service, I could not schedule a refresh because that authentication method doesn't work there. I have read a lot of blogs around adding headers and using relative path, but I haven't figured out how to make that work for me. Does anyone 

1 ACCEPTED SOLUTION
b_infinity_1
Regular Visitor

I found the solution! It was made via a blending of the relative path concept from Chris Webb's blog: Chris Webb's BI Blog: Using The RelativePath And Query Options With Web.Contents() In Power Query An... with a base 64 concept from the following blog: Encoding basic authentication in an url with Power Query/M language | Ambiguity vs Information (word...

Essentially, you make the basic path for the api the main page of azure devops, then you add the specific API page you want to visit to the relative path. You specifcy basic connection, make the username blank and pass the api key into the password. You encode this in base64 with the code shown in the other article. Hope this helps anyone else who may need it.

View solution in original post

3 REPLIES 3
b_infinity_1
Regular Visitor

I found the solution! It was made via a blending of the relative path concept from Chris Webb's blog: Chris Webb's BI Blog: Using The RelativePath And Query Options With Web.Contents() In Power Query An... with a base 64 concept from the following blog: Encoding basic authentication in an url with Power Query/M language | Ambiguity vs Information (word...

Essentially, you make the basic path for the api the main page of azure devops, then you add the specific API page you want to visit to the relative path. You specifcy basic connection, make the username blank and pass the api key into the password. You encode this in base64 with the code shown in the other article. Hope this helps anyone else who may need it.

v-stephen-msft
Community Support
Community Support

Hi @b_infinity_1 ,

 

Try the following methods

Datasets - Get Refresh Schedule

Datasets - Get Refresh Schedule In Group

 

 

 

Best Regards,

Stephen Tao

 

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

b_infinity_1
Regular Visitor

*does anyone know how to make this work? 

 

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.

Top Solution Authors
Top Kudoed Authors