Jan 06 2021 03:12 AM
Dear Ladies and Gentlemen,
how can I get all site collections, for which the logged in user has access rights, through SharePoint Framework, which works in Office 365 and in SharePoint on premise?
Thank you very much for your help.
With best regards
Ladislav Stupak
Jan 06 2021 06:12 AM
@LadislavStupak I would use the Search REST API to get all of the site collections.
_api/search/query?querytext='contentclass:sts_site'
Jan 06 2021 07:26 AM
@Beau Cameron thank you for your answer.
When I do it through the following method below, then I receive following error: "Microsoft.SharePoint.Client.UnknownError
Jan 08 2021 07:39 AM
SolutionThis method is working well:
Jan 08 2021 08:44 AM
This method is better, because in case the restApiUrl contains some additional parameters, the position of Title and path in the cells array can change:
Jan 08 2021 07:39 AM
SolutionThis method is working well: