I have been trying to work out this using Power Automate to list all sites in the site collection with the URL that contains at the end "ABC". I don't want to use names as it's not consistent.

I have tried using this:


But it doesn't return the right result. The documentation states query but what are the query options.

So if a site is https://tenant.sharepoint/sites/ABC or https://tenant.sharepoint/sites/ABCD.

I want to filter sites that are like 'ABC' or contains 'ABC'.

Also the Get a site resource by path doesn't explain much.

1 Answer 1


Try this. You may have to filter the result set that comes back to remove some extraneous results, but it should get you the results you're looking for.


For more information on the use of $search in Microsoft Graph see: Use the search query parameter to match a search criterion

  • Thanks Rob and thats what exactly i was doing.
    – naijacoder
    Commented Feb 25, 2022 at 0:37
  • @naijacoder Sorry for missing that my suggestion was to do exactly what you were already doing. I guess I was focused on the answer more than I was on the question. 🤦‍♂️ Commented Feb 25, 2022 at 19:03

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.