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

Be one of the first to start using Fabric Databases. View on-demand sessions with database experts and the Microsoft product team to learn just how easy it is to get started. Watch now

Reply
Ashish560037
Regular Visitor

Web connector to SharePoint list works fine in Desktop but fails in Service

Hi Everyone,

 

Any help on this issue is greatly appreciated. I'm connecting to a SharePoint list using Web connector. (Not using a Sharepoint list connectoras it takes too long to refresh data.) It works fine when I refresh the data in the Desktop version. 

But once I publish it to service, it throws the error whenever I try to update the credentials and thus wont refresh.

Ashish560037_0-1706698526113.png

Please help.

1 ACCEPTED SOLUTION

Yes I see, please take a look at this, he had the same issue as you

Solved: Credentials for web conection are invalid (custom ... - Microsoft Fabric Community

 

Regards
Amine Jerbi

If I answered your question, please mark this thread as accepted
and you can follow me on
My Website, LinkedIn and Facebook

View solution in original post

6 REPLIES 6
Ashish560037
Regular Visitor

I tried the change mentioned in the link and it worked. Thanks Amine!!! You are a life saver...

aj1973
Community Champion
Community Champion

Hi @Ashish560037 

Tou use Web connector instead you need to copy/paste the Path of the file and not the Sharepoint URL.

Regards
Amine Jerbi

If I answered your question, please mark this thread as accepted
and you can follow me on
My Website, LinkedIn and Facebook

Hi Amine,

In the path, I'm giving the full path of the list in my M code as in "https://<mysitename>.sharepoint.com/sites/<mylistname>/_api/web/lists/getbytitle('"&listName&"')/items?""

 

Also, if there was an issue with the path, wouldn't it fail in Power BI dasktop as well? But in my case it works fine in desktop.

This doesn't seem like a Sharepoint List to me !

Can you please share the M code?

To answer you question, the refresh can work fine in Desktop but fails in the service..

Regards
Amine Jerbi

If I answered your question, please mark this thread as accepted
and you can follow me on
My Website, LinkedIn and Facebook

Oh I didn't know that. Thanks for clarifying.

 

Here's the initial part of the M code where I connect to the list. The part after this is just selecting the columns. Hence not sharing that.

 

----

let 
    baseURL = "https://<sharepointsite>.sharepoint.com/sites/<subsite>",
    listName = "<listname>",
    GetPages = (Path)=>
        let
            Source = Json.Document(
                Web.Contents(
                    baseURL, 
                    [
                        RelativePath = Path,
                        Headers=[
                            Accept="application/json;odata=nometadata"
                        ]
                    ]
                )
            ),
            ll= Source[value],
            Next = Text.Replace(Source[odata.nextLink], baseURL, ""),
            result = try @ll & Function.InvokeAfter(()=> @GetPages(Next) , #duration(0,0,0,0.1)) otherwise @ll
        in
        result,
    
        Fullset = GetPages("/_api/web/lists/getbytitle('"&listName&"')/items?"

Yes I see, please take a look at this, he had the same issue as you

Solved: Credentials for web conection are invalid (custom ... - Microsoft Fabric Community

 

Regards
Amine Jerbi

If I answered your question, please mark this thread as accepted
and you can follow me on
My Website, LinkedIn and Facebook

Helpful resources

Announcements
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!

Dec Fabric Community Survey

We want your feedback!

Your insights matter. That’s why we created a quick survey to learn about your experience finding answers to technical questions.

ArunFabCon

Microsoft Fabric Community Conference 2025

Arun Ulag shares exciting details about the Microsoft Fabric Conference 2025, which will be held in Las Vegas, NV.

December 2024

A Year in Review - December 2024

Find out what content was popular in the Fabric community during 2024.