I tried to create a modern team site using PnpCore. I tried to do it according the Create Modern Sites in SharePoint Online using CSOM , using the newer SharepointPnPCore Online 2.24.1803
TeamSiteCollectionCreationInformation modernteamSiteInfo = new TeamSiteCollectionCreationInformation
{
Description = "Test modern teamsite description",
DisplayName = "Test Modern Team Site",
Alias = "https://tenantname.sharepoint.com/sites/TestModernTeamSite",
IsPublic = true,
//Classification="IT"
};
var createModernSite = await context.CreateSiteAsync(modernteamSiteInfo);
I end up with following error message:
{"error":{"code":"-1, System.Data.Services.Client.DataServiceClientException","message":{"lang":"en-US","value":"{\"odata.error\":{\"code\":\"Request_BadRequest\",\"message\":{\"lang\":\"en\",\"value\":\"Invalid value specified for property 'mailNickname' of resource 'Group'.\"},\"requestId\":\"256331ca-f5a9-4664-b48f-355747cb25d5\",\"date\":\"2018-03-12T09:29:40\",\"values\":[{\"item\":\"PropertyName\",\"value\":\"mailNickname\"},{\"item\":\"PropertyErrorCode\",\"value\":\"InvalidValue\"}]}}"}}}
Did I miss anything?
Alias = "TestModernTeamSite",
and checking ?