Unable to Connect to Web Source With Credentials in Power Query

Copper Contributor

I have tried to connect to 20+ websites that require sign-in credentials using Power Query without success.  I am able to login using Chrome so the credentials are correct.  The error I receive is below.  I have clicked Edit Credentials and re-entered the creds, only to get the same error.  I have cleared the permissions in Power Query and re-done numerous times without success.  Also, I'm certain I have used the feature successfully around a year ago.

 

Is there a setting in Power Query that enables connecting with credentials?  Any other ideas?

 

edit credentials.png

27 Replies

Hi,

We've been suffering from this problem for months and trying to get MS attention - maybe in the wrong places :-(.

see: https://excel.uservoice.com/forums/304921-excel-for-windows-desktop-application/suggestions/20166799...

 

My latest response there shows my frustration and it was only through examination of the user-agent heder that Excel supplied that I found a link to this tech community and I was going to post a new thread before I found this one.

 

To one extent, I am glad we're not the only ones suffering - it might get some attention now.

On the other hand, I'm not holding my breath until I can see that someone at Microsoft has read and understood the problem.

 

Any tips will be very much welcome.

 

Thanks,

Tim

Tim, would you mind sending more details of your issue (along with a Fiddler trace, if possible) to pq2fb@microsoft.com? Please mention my name when you do so.

 

Thanks,

Ehren

Thank you for following up. I have emailed some details FAO: Ehren.

@Toynk AccountingDo you have updates on this issue? I am currently facing same problem. But I find it a bit weird as it was working fine in my old laptop. I just posted my case few hours back.

 

https://techcommunity.microsoft.com/t5/Excel/Excel-Query-From-Web-Old-laptop-OK-new-PC-not-OK/m-p/88...

 

@Deleted I thought I'd posted my workaround, but maybe not here.

Briefly: it won't work with this new style, you have to re-enable the legacy data wizard and use that.

This does still work - I used it last week.

https://support.office.com/en-gb/article/data-import-and-analysis-options-3ea52160-08bc-45ac-acd9-bc4a11bcc2a2

@Tim Scott Tried to enable legacy data wizard but still didn't work. I also tried to use Power BI and gave me save result. New PC unable to fetch other tables. Is there a special data connector microsoft uses or it is really an issue with credentials?

 

Btw, Old laptop OS is Windows 10 Home, new PC OS is Windows 10 PRO. Does this affects Excel/PowerBI web data scraping?

@Deleted From what I gathered, the new method did not handle authentication and the legacy wizards behave in the way they used to. At the risk of making a silly point, you did go to the legacy wizards option on the menu, not the option which now launches the new method, didn't you?

@Tim Scott I went to Excel Options >> Data >> Show legacy data import wizards

Hope I did get you correctly.

Excel - New_PC_Legacy.PNG

 

Just for reference, below are Navigator snapshot using Power BI

PBI_NewPCPBI_NewPCPBI_OldLaptopPBI_OldLaptop

@Deleted first of all, it looks like the query on your old PC hasn't been refreshed in months.  From the Query Editor, click on REFRESH ALL and see if it still works.  If it does work, click on the Web View tab and post a screen shot of both PC's (redacting any sensitive info of course).  Lastly, click on Data Source Settings on the Main tab in Query Editor and then Edit Credentials.  See how the old one is set-up compared to the new PC.  I'm not convinced your problem is authentication or that your problem doesn't exist on the old PC.  This will prove or disprove, I think.

 

@Tim Scott's legacy wizard suggestions are not at all what you're looking for.  the legacy scrape is far inferior and you old PC was not using legacy.  Not sure why it's even being suggested.

 

To answer your question to me, I did figure this out - somehow.  Can't recall exactly.  But it had something to do with typing my password into the API credentials, I think.  I can't quite recall but it wasn't an obvious move.  After 2 years with no answer, I just started trying things and it worked.  Did it for a few other sites, didn't write it down, now I can't remember.

@Toynk Accounting I just click REFRESH ALL in old PC and it is still working. 

Below screenshots of each Navigator Web View (Seems like Internet Explorer is causing the error?)

NewPC_WebViewNewPC_WebViewOldPC_WebViewOldPC_WebView

 

Regarding Data Source Setting, both are same and was reference to old PC

Well - the legacy wizard solved my problem. If that's not the answer, either Microsoft have changed something in two years or it's a different problem.

@Deleted interesting.  I guess try and turn off the Internet Compatibility settings.  Otherwise, I'm a at a loss. Sorry can't be of more help

@Toynk Accounting sadly that didn't work as well. 

I remember in the past when I was working in the old PC for the same thing, I was able to enter credentials (Username & Password), and after that, query shows all the tables I needed (that was Aug-Sept 2018). I really do not understand why credentials entry are currently not working properly. 

Hi @Deleted. Is it possible that your old PC is using the MSI version of PBIDesktop, and your new PC is using the Microsoft Store version? Are they running the same numeric version of PBIDesktop as well?

 

Ehren

@Ehren von Lehe Yes, new PC PBI was from Microsoft store. I re-install PBI using the installer, and now it is able to get the table/s. Though still confused because credentials are still invalid, but when I selected anonymous, it worked...

 

Old PC has Aug2019 version, new PC has Sept2019 version (not sure if this is the numeric versions you were asking..)

 

I think, it is the installer versions solved the issues. Thank you very much for this.

 

Regarding EXCEL query, it is also now working... I didn't change any settings. I just tried if the other option for "From Web" function under "Get Data>>From other sources>>From Web", and fortunately succeeded (not sure if this was really the solution...). On this one, I used credentials and was accepted.

 

Thank you All for your help...

 

@Deleted Great. The MSI version overrides a few Internet Explorer settings (which is what Web.Page uses behind the scenes), and the store version isn't (yet) able to override those settings. These settings must be what allows this particular page to work for you.

 

Ehren

@DeletedI got it working!

 

Steps to reproduce:

  1. Enable Web (legacy)
  2. Get data/Legacy wizard/Web
  3. Type the URL you want to access
  4. Enter your credentials on the login page and press Login (or equivalent). In my case, the Login button did not seem to be working. I press several time, but nothing happened - not an issue it seems (see below).
  5. Press Load. This will load the content of the page you're trying to access directly in Excel. Not really usable, but we are just using this step to get the login credentials into Excel.
  6. Now we can do: Get data/From other sources/From Web
  7. Type the URL from step 3 and press OK.
  8. Select the table you are trying to access and press Load.
  9. That's it!

The trick really is that you use the legacy wizard to store the password that is then somehow used by the non-legacy wizard... Weird!

What I believe you end up with, here, is the credentials stored in the background "IE session" that Excel is using - and then reusing for the non-legacy wizard.
As a one-off, it's a good solution.
For my situation, I wanted a perpetual or repeated login to operate month after month and to be able to write up a "how to" for our customers who are not so savvy.