Web.Contents() ApiKeyName not working RRS feed

  • Question

  • I'm calling a web service (the Microsoft Pulse, previously Bing Pulse) via Power Query and while I can authenticate successfully using the Headers option, for some reason I can't make ApiKeyName work. So, for example, the following expression works with no problems:

    Source = Web.Contents("", [Headers=[#"Authorization" = "insert-key-here"]]),

    ...but when I replace this with the following:

    Source = Web.Contents("", [ApiKeyName="Authorization"]),

    ...the credentials dialog pops up, I paste the API key into the box on the Web API tab and I get a "user was not authorized" error. I'm a bit mystified because I've used this with no problems for other web services. The only thing I can guess that might be the problem is that the API key contains dashes.

    Have I made a stupid mistake somewhere, or have I hit a bug? The same thing happens in Excel 2016 and Power BI.



    Check out my MS BI blog I also do SSAS, PowerPivot, MDX and DAX consultancy and run public SQL Server and BI training courses in the UK

    Thursday, January 14, 2016 11:42 PM


All replies