0

I'm creating a console application that will upload files to a SPO site collection. I'm registering a SharePoint app using /Appregnew.aspx page and obtain ClientID and ClientSecret and use it on my console application. I need this console application to work on any of the site collection in SPO tenant.

If I want to use this console application in another site collection within the same tenant, do I need to register a SharePoint app in the new site collection and obtain the ClientID and ClientSecret for that site collection as well?

What's the scope of a SharePoint app registered in SPO? is it tenant level or site collection level?

supunbula
  • 1
  • 2

2 Answers2

0

As you can see here all applications authentication flow for SharePoint add-ins are handled by the SharePoint ACS. A same ACS is generally used for all the site collections of a tenant. so your id/secret should be valid.
That being said you still need to grant permissions to the application on the target resources, meaning accepting the consent flow or doing a general deployment via the app catalog.

baywet
  • 4,377
  • 4
  • 20
  • 49
0

It turns out that the scope of the SharePoint add-in registration is determined by the App Permission configuration scope. If it's Site Collection level then your add-in would be Site Collection Scope. If it's Tenant level, then your add-in would be Tenant scope.

Below article helped me a lot on achieving my task.
https://blogs.msdn.microsoft.com/kaevans/2014/03/02/building-a-sharepoint-app-as-a-timer-job/

supunbula
  • 1
  • 2