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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

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
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.

Top Solution Authors
Top Kudoed Authors