locked
Provisioning site collections with SharePoint Hosted App RRS feed

  • Question

  • I referred to the Office Dev PnP code on Github to create Site Collections in my O365 environment. The code uses CSOM as Provider Hosted App to provision the Site Collections. However, it is possible to convert the same code to a SharePoint Hosted App (JavaScript + HTML)?

    I referred the code @ Site Collection Creation to create Site Collections.

    Wednesday, March 9, 2016 5:56 AM

Answers

  • Hi,

    This won’t be achievable naturally due to that JavaScript can’t get the context in the tenant level, CSOM in a Provider Hosted App would be the only option when comes to SharePoint App.

    Best regards,

    Patrick Liang


    TechNet Community Support
    Please remember to mark the replies as answers if they help, and unmark the answers if they provide no help. If you have feedback for TechNet Support, contact tnmff@microsoft.com.

    • Marked as answer by SharePointGuy Thursday, March 10, 2016 10:23 AM
    Thursday, March 10, 2016 7:13 AM

All replies

  • Hi,

    Thanks for posting in MSDN forum.

    This forum mainly discuss issues about Office add-in developing. Since the issue is more relative to SharePoint developing, I would like to move it to SharePoint developing forum.

    The reason why we recommend posting appropriately is you will get the most qualified pool of respondents, and other partners who read the forums regularly can either share their knowledge or learn from your interaction with us. 
    Thanks for your understanding.

    Regards & Fei


    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click HERE to participate the survey.

    Thursday, March 10, 2016 5:56 AM
  • Hi,

    This won’t be achievable naturally due to that JavaScript can’t get the context in the tenant level, CSOM in a Provider Hosted App would be the only option when comes to SharePoint App.

    Best regards,

    Patrick Liang


    TechNet Community Support
    Please remember to mark the replies as answers if they help, and unmark the answers if they provide no help. If you have feedback for TechNet Support, contact tnmff@microsoft.com.

    • Marked as answer by SharePointGuy Thursday, March 10, 2016 10:23 AM
    Thursday, March 10, 2016 7:13 AM