Use SiteCollection permissions. Reference at https://video2.skills-academy.com/en-us/sharepoint/dev/sp-add-ins/add-in-permissions-in-sharepoint#types-of-add-in-permissions-and-permission-scopes.
Sharepoint App Only permissions copied to subsites
I have full control of a site in my companies Sharepoint online tenant. I do NOT have Site collection or Tenant admin. rights.
I am able to create a app only service principal with full rights to the site I control, with web scope.
I need to extend those rights to all subsites of my site.
Is there code that will allow me to do that without manually adding the service principal to each sub-site?
Dave
2 answers
Sort by: Most helpful
-
-
Jerryzy 10,571 Reputation points
2020-08-31T03:45:39.013+00:00 Hi @David Croome/CAN ,
As @Trevor Seward 's suggestion, please use http://sharepoint/content/sitecollection permission level, this will include all the sub site under the sitecollection which SharePoint add-in hosted.
If the response is helpful, please click "Accept Answer" and upvote it.