Forum Discussion
Unable to provision modern site using provider hosted app in SharePoint 2019
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.
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 ?
- ArvindKumar MepaniJul 23, 2019Brass Contributor
Hi paulpascha ,
We have updated the CU version (May 2019 CU) but still we are not able to create modern site collection using provider hosted app.
Note: we are not using App only authentication. We have added GetS2SAccessTokenWithWindowsIdentity for the authentication as per our requirement.
We are using following code snippet is for authentication:
TokenHelper.GetS2SAccessTokenWithWindowsIdentity(tenantAdminUri, HttpContext.Current.User.Identity as WindowsIdentity);
- paulpaschaJul 24, 2019Bronze ContributorIs it possible for you to share your full app? I can then try installing and running on my environment to see what happens