I tried a request at a url of the following form

.../_api/web/Lists/getByTitle('docLib')/items?$select=id,GUID&$top=1&$filter=GUID eq '2779cf8051-381f-4834-93dc-ece6345dde33'

and i get "Microsoft.SharePoint.SPQueryThrottledException : The attempted operation is prohibited because it exceeds the list view threshold enforced by the administrator."

I find this very peculiar because a request at


does not give an error and returns the list of all items (I think) in "docLib".

Any other way to get the id of an item by its GUID ?


The error described appears only when searching in a list with more than a few thousand(i think 5000) items. I need something to work regardless of the number of items in the list.

  • Have you try to move the &top=1 to the end of the URL? for some strange reason that works for me sometimes.
    – cubanGuy
    Commented Nov 17, 2014 at 17:34
  • Have you tried casting? E.g., guid'2779cf8051-381f-4834-93dc-ece6345dde33'
    – eirikb
    Commented Mar 6, 2015 at 6:27

8 Answers 8


Use the UniqueId instead of GUID. Try the following end url,

.../_api/web/Lists/getByTitle('docLib')/items?$select=id,UniqueId&$top=1&$filter=UniqueId eq '2779cf8051-381f-4834-93dc-ece6345dde33'

This seems work in both on-premise and online environment.


Try it without the $top -- no two items in the same list should have the same GUID

This works fine for me on SharePoint Online:

$.getJSON("/_api/web/lists/getByTitle('Documents')/items?$select=GUID&$filter=GUID eq '86ff528f-75d2-48e9-8ce9-e4814ae98e42'", function(data) { console.log(data) })
  • i tried different variants, with and without the top and select. the error i described appears only when searching in a list with more than a few thousand(i think 5000) items. I need something to work regardless of the number of items in the list Commented Nov 18, 2014 at 7:40
  • The 5000 list item threshold is a well documented limitation of the platform -- support.office.com/client/… -- probably not what you want to hear but you should consider re-architecting to go below 5k for any individual list or switch to a database for handling your particular issue... No API for SP will just 'always work' without regard to that limit
    – John-M
    Commented Nov 18, 2014 at 14:08
  • Also consider adding an index as a workaround -- more details in that article I linked to
    – John-M
    Commented Nov 18, 2014 at 14:09
  • 1
    This definitely needs more upvotes.
    – DaleyKD
    Commented May 14, 2021 at 20:38

In my case, I wasn't able to get the other solutions to work, but that using ID worked for me (in the online environment).

/_api/web/lists/GetByTitle('Custom List Name')/items?$select=Title,FieldValuesAsHtml,PublishingPageContent,ID&$filter=ID eq '3'

Once a list or library hits the list view threshold (in SharePoint Online it's 5000 items) you're no longer able to filter using non-indexed columns.

If you're anticipating a list to have more than 5000 items you should make sure to create an indexed column for any of the columns that you're planning to filter on. Unfortunately in this case the 'GUID' column is owned by SharePoint, and you're not going to be able to create an index for it.

If you're really stuck on using the 'GUID' value I'd suggest that you create a new text column (ie 'myGUID') along with a corresponding index. Then create a new item workflow that sets 'myGUID' to be equal to 'GUID'. Once that's done you'll be able filter the list using the 'myGUID' column. Of course, you'll still need a way to populate the myGUID values for all of the existing items, but a quick and dirty powershell script or list workflow could easily take care of this.


I see your GET request url is correct but you are getting error because your view has more than more than list threshold limit 5000 you are unable to do filter operation.

As we all know creating multiple views to avoid this limitation on a list. So you can try POST request by passing view xml using REST api.

The syntax would be as follows. This you have to do using POST request

siteurl/_api/web/Lists/GetByTitle('list title')/GetItems(query=@v1)?@v1={"ViewXml":"<View><Query><Where><Eq><FieldRef Name='GUID'/><Value Type='Guid'>your guid</Value></Eq></Where></Query></View>"}

As I mentioned in my comments, move the &Top=1 to the end of the URL.

.../_api/web/Lists/getByTitle('docLib')/items?$select=id,GUID&$filter=GUID eq '2779cf8051-381f-4834-93dc-ece6345dde33'&$top=1

I noticed that regardless the fact each item has its own GUID, REST seems to ignore it in this case.


Unforunately, at thi moment 2019,there is not way to get by GUID an Item or just the ID and GUID is not indexed yet.

  • This way you can do it. /_api/web/Lists/getByTitle('OnPremColabPOC')/GetItemByUniqueId(guid'715be6a9-4cbd-4def-9cd0-c6aa22f12cf3')?$select=id,UniqueId,Title,File/ServerRelativeUrl&$expand=File Commented May 13, 2020 at 19:42

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.