Forum Discussion
Unable to provision modern site using provider hosted app in SharePoint 2019
ArvindKumar Mepaniwhat version of Microsoft.Online.SharePoint.Client.Tenant.dll are you referencing in your project?
I've just created a simple Console Application to see if I was able to create both a modern team site and a communication site collection in my environment and it gives me the modern sites as expected. I'm basically using the same code as yours except that I don't call SetThemeToNewSite in the end. Could it be this method is causing your site to revert back to classic experience somehow?
I'm using version 16.1.9021.1200 (latest version of Microsoft.SharePointOnline.CSOM NuGet package).
- ArvindKumar MepaniJul 22, 2019Brass Contributor
Thanks for your help, paulpascha
The version of Microsoft.Online.SharePoint.Client.Tenant.dll is 16.1.9021.1200.
I am also able to create a modern site collection using a console app. But when I tried creating modern site collection with the same code using provider hosted app, it always creates classic site only.
I have removed SetThemeToNewSite method as well.
- paulpaschaJul 23, 2019Bronze ContributorWeird!
The Console App I wrote is technically a Provider-hosted add-in (using app only authentication) so I can't really see the difference compared to a typical web-based Provider-hosted add-in.
I've checked the CU level of my Farm which is slightly higher than yours, (May 2019 CU).- somaliaDec 03, 2020Copper Contributor
paulpascha Hello, can you please tell me if provider hosted app can be created using modern team or communication sites?
Also, can we select ASP.Net MVC from visual studio ?