0

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:

https://graph.microsoft.com/v1.0/sites?search=ABC$top=2"

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

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.

https://graph.microsoft.com/v1.0/sites?$search="ABC"

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

2
  • Thanks Rob and thats what exactly i was doing.
    – naijacoder
    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. 🤦‍♂️ Feb 25, 2022 at 19:03

Your Answer

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

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