The power BI service runs a test connection on Web API data sources before pulling data. However for Web Sources whose response depends on a required authorization header fail to authenticate in the power bi service while setting up a scheduled refresh. The source is accessed using Web.Contents and by passing the URL, Relative path and authorization header. This works perfectly fine in Power BI desktop since it executes the GET request along with the authorization header without a test connection. If the same could be done in power bi service by either bypassing the test connection or ignoring failures then a schedule refresh could be setup.