In SPO, we have created a custom action in the sharepoint ribbon using the SharePoint hosted app. We would like to make this custom action available in all the site collections. To achieve this we have installed the app in the APP Catalog site with tenant scoped deployment. Because of this, we are having trouble with these 2 scenarios in all the site collections where this app is deployed automatically .

  1. The custom action is visible only in the app catalog site collection and not in any other sites. Is there any possibility to ensure that the custom action is deployable to all site collections...???
  2. When we open the default.aspx page of the app in the any other site collection, by default the host web is always the app catalog when accessed using ECMA. Even if we manually try to create a client context by reading the HostUrl query string parameter, it gives unquthorized exception. Is it possible to create client contexts for the actual site collection url in this case...???
  • Does the app have at least read on tenant permission? – wjervis Aug 26 '15 at 14:28
  • Currently the app has HostWeb read access. Are you suggesting to use "APP only permissions" and then grant the APP read permissions for the tenant...?? – Suresh Kumar Senapati Aug 27 '15 at 18:15
  • Nevermind, Derek has your answer. – wjervis Aug 27 '15 at 18:17

Custom Actions are not allowed in Tenant-scoped Apps and will not work. Read the section "Limitations of Tenant-Scoped Add-ins". https://msdn.microsoft.com/en-us/library/office/FP179896.aspx

  • Good catch. I knew that app parts weren't allowed, didn't know about custom actions though. – wjervis Aug 27 '15 at 18:17

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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