Forum Discussion
Can i get a list of all site collections in a tenant using power automate?
- Jul 14, 2023
JeanneDarche Are you using Send HTTP Request to SharePoint action? what is the the Uri/endpoint you are using?
Usually, you can add &$top=5000 at the end of REST API endpoint to get more than 100 items.
Please click Mark as Best Response & Like if my post helped you to solve your issue. This will help others to find the correct solution easily. It also closes the item. If the post was useful in other ways, please consider giving it Like.
JeanneDarche Are you using Send HTTP Request to SharePoint action? what is the the Uri/endpoint you are using?
Usually, you can add &$top=5000 at the end of REST API endpoint to get more than 100 items.
Please click Mark as Best Response & Like if my post helped you to solve your issue. This will help others to find the correct solution easily. It also closes the item. If the post was useful in other ways, please consider giving it Like.
- Sandy UssiaJul 16, 2023MVPThis is a cool method; I wasn't aware of that hidden list of site collections that you can get to without a premium Power Automate license. I've tested this (including the $top parameter to remove the 100 limit), and it works great - thanks, Ganesh!
- JeanneDarcheJul 17, 2023Copper Contributor
- ganeshsanapJul 18, 2023MVP
JeanneDarche You can add ?$top=5000 after /items like:
_api/web/lists/getbytitle('DO_NOT_DELETE_SPLIST_TENANTADMIN_AGGREGATED_SITECOLLECTIONS')/items?$top=5000
Please consider giving a Like if my post helped you in any way.
- JeanneDarcheJul 18, 2023Copper ContributorIt worked!
Thanks so much for your help!
Jeanne
- M365Dev-ANSep 12, 2024Copper Contributor
ganeshsanap would you be able to help in how to get sites more than 5000? We may have more than 20k sites