Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
4 years ago

Linking authentication-needing files

Hello!

 

I have a domain/website that needs a form authentication. After I authenticate, I can click on some links which will download some xls files.

 

I want to put these links into a Data Connection and download them directly in Excel. However, when I do that, it downloads the login page instead of the actual file.

 

I tried various authentication and privacy settings but non worked.

 

Is it possible to have Excel use the cookie from MS Edge or somehow use the authentication I did via MS Edge?

 

Thanks!

11 Replies

  • Ehren's avatar
    Ehren
    Microsoft Employee

    PQ in Excel will use saved Internet Explorer (not Edge) cookies if you're using Web.Page to download the data. However, there's no way to script page clicks or other kinds of automation.

    • Anonymous's avatar
      Anonymous
      Not applicable

      Ehren  thanks but can you tell me please how to set up such connection?

       

      Normally I go via IE to https://some.domain.com and I login via a form and then there is another form for authentication. At the end, I manage to authenticate and initiate a session.

       

      Then, if I visit https://some.domain.com/donwload/943/ an xlsx will be downloaded.

       

      How do I create a connection to such xlsx file?

       

      I add a Get Data > From Web connection and insert the https://some.domain.com/donwload/943/

       

      Then, it asks me for authentication type, which should I choose and at which level (i.e. domain.com or domain.com/donwload etc)?

       

      Thanks!

      • Ehren's avatar
        Ehren
        Microsoft Employee

        Try using Anonymous auth for domain.com.

  • Anonymous's avatar
    Anonymous
    Not applicable

    Ehren  thanks indeed I read about the Legacy importer and tried it but not useful.

     

    I guess what I am struggling to understand is that if Web.Contents shares cookies with IE and if I have an active IE session where the IE is not closed, why isn't the session kept alive so that Web.Contents will 'share' this session?

     

    I mean, whenever Web.Contents shares IE cookies, it initiates a new session every time so it will only work when the cookies are persistent?