web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Automate / Trying to hide list wi...
Power Automate
Unanswered

Trying to hide list with HTTP Sharpeoint connector

(0) ShareShare
ReportReport
Posted on by 95

Hi,

 

I'm trying to hide my SP list from browser (and from search) but I keep getting the error message that it can't find the list in my site.

 

However I know that the list exists in my site. I copied it's name out of the URL for that list to ensure I didn't make a typo and I checked the original name that the list was created with and its the same. The list was renamed subsequently but I tried this new name and it also didn't work.

 

This is my flow:

danru_0-1669820137696.png

 

I get this error:

danru_2-1669820340906.png

 

danru_4-1669820437082.png

 

danru_5-1669820549847.png

 

Here is the error message in full:

 

 

{
 "status": 404,
 "message": "List 'ListName' does not exist at site with URL 'https://TenantName.sharepoint.com/teams/SiteName'.\r\nclientRequestId: 01476e56-48f4-46bc-8233-b62592d67444\r\nserviceRequestId: 91987da0-b0ac-5000-9343-e25266331a9c",
 "source": "https://TenantName.sharepoint.com/teams/SiteName/_api/web/lists/getbytitle('ListName')",
 "errors": [
 "-1",
 "System.ArgumentException"
 ]
}

 

 

I would really appreciate some pointers on what I'm doing wrong. Thank you so much.

 

Regards,

 

Daniel

Categories:
I have the same question (0)
  • Expiscornovus Profile Picture
    33,183 Most Valuable Professional on at

    Hi @danru,

     

    It looks like you made a small typo in the Headers. It should be If-Match instead of If_Match. Btw, also make sure you use the Title of the List and not the Path.

     

    Lastly, I notice you are using the Teams managed path (teams/sitename). I assume that is correct? The sites managed path is more common but it is an option the use the Teams managed path for site creation 😁


    Try something like below:

     

    Uri

     

     

    _api/web/lists/getbytitle('Hidden List')

     

     

     

    Headers

     

     

    {
     "Accept": "application/json;odata=verbose",
     "Content-Type": "application/json;odata=verbose",
     "If-Match": "*",
     "X-HTTP-Method": "MERGE"
    }

     

     

     

    Body

     

     

    {
     "__metadata": {
     "type": "SP.List"
     },
     "Hidden": true,
     "NoCrawl": true
    }

     

     

     

    hidelist.png

  • danru Profile Picture
    95 on at

    Hi @Expiscornovus

     

    Thanks so much for replying to me.

     

    I made the changes as per your instruction but still get the same error.

     

    The Microsoft team was created first and this SP site was created by the creation of the team. Could that be the problem? 

     

    Thanks again for your help!

     

    Regards,

     

    Daniel

  • Verified answer
    Expiscornovus Profile Picture
    33,183 Most Valuable Professional on at

    Hi @danru,

     

    Can you navigate to the list on the SharePoint site and make a screenshot of the list name and share it over here? Or does that name contain sensitive information and are you not allowed to share it? 

     

    The reason I am asking is because it could be a typo in the URI field for the list name

     

    If your list name contains a space like for example Hello World, that space should also be included in the getbytitle('Hello World') value. This would not work: getbytitle('HelloWorld')

     

    Btw, did you try and select the site from the dropdown in the Site Address field? Or is it not listed in that dropdown list?

  • danru Profile Picture
    95 on at

    Hi @Expiscornovus ,

     

    It worked. I used the name of the list that appears above the actual list itself on the SP site with the spaces and all.

     

    Even though that's not the name of the list in the URL (the name used upon the creation of the list) but rather the name that I subsequently changed it to?

     

    How does it work?

     

    Thank you so much for your help Sir🙏🙏🙏

     

    Regards,

     

    Daniel

  • Expiscornovus Profile Picture
    33,183 Most Valuable Professional on at

    Hi @danru,

     

    Yes, that explains why it was not working before.

     

    The name of the list in the URL is the Path and could even be encoded (special characters are not allowed in URLs).

     

    The getbytitle method would expect the current list name from the interface and not the one from the URL.

     

    Hopefully, that clarifies things? 😀

  • danru Profile Picture
    95 on at

    Hi @Expiscornovus ,

     

    You've explained it perfectly. If there a method other than 'getbytitle' that can be used with the path?

     

    Thank so much again. You've really helped me.

     

    Regards,

     

    Daniel

  • Expiscornovus Profile Picture
    33,183 Most Valuable Professional on at

    Hi @danru,

     

    There is another method, the getbyid method. But that one expects the GUID of the list:

    https://learn.microsoft.com/en-us/previous-versions/office/sharepoint-server/ee538586(v=office.15)

     

    Only workaround which I could think of would be to use a $filter query parameter and see if you can find a match when you are listing all the lists. But that would require another Send an HTTP request with a GET before the one with the POST request.

     

    In other words, just use the current list name value, much easier 😁

  • danru Profile Picture
    95 on at

    Hey @Expiscornovus ,

     

    Many thanks for your advice! It's golden.

     

    Have a great week.

     

    Regards,

     

    Daniel

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Automate

#1
Michael E. Gernaey Profile Picture

Michael E. Gernaey 506 Super User 2025 Season 2

#2
Tomac Profile Picture

Tomac 425 Moderator

#3
abm abm Profile Picture

abm abm 245 Most Valuable Professional

Last 30 days Overall leaderboard