I am using OfficeDevPnP package to create new Modern Team No Group site collection but i got below error
"You need to set the owner in App-only context". See the function execution logs for additional details. ---> System.Exception: You need to set the owner in App-only context at OfficeDevPnP.Core.Sites.SiteCollection.d__8.MoveNext()
Here is my code,
using (ClientContext context = authManager.GetAppOnlyAuthenticatedContext("TenanatUrl", "ClientId", "ClientSecrete"))
{
var creationInformation = new OfficeDevPnP.Core.Sites.TeamNoGroupSiteCollectionCreationInformation(siteUrl, siteName, userName);
var results = await context.CreateSiteAsync(creationInformation);
}
I am using AppOnly Context here and also provided tenant full control permissions.