Skip to content

Bug report: Error: Method "EnableCommSite" does not exist #5154

@Saurabh7019

Description

@Saurabh7019

Priority

(Low) Something is a little off

Description

When executing the command m365 spo site commsite enable on a Team site, an error occurs, stating that the method "EnableCommSite" does not exist. This issue prevents the command from being executed successfully and hampers the ability to enable communication sites in the SharePoint Online (SPO) environment.

Steps to reproduce

  • Log in to Microsoft 365
  • Execute the below command
    m365 spo site commsite enable --url https://contoso.sharepoint.com/sites/classicteamsite1

Expected results

The command should execute successfully, enabling communication site features on the specified site.

Actual results

The command fails with the error message "Error: Method 'EnableCommSite' does not exist."

Diagnostics

Executing command spo site commsite enable with options {"options":{"url":"https://contoso.sharepoint.com/sites/classicteamsite","debug":true,"output":"json"}}
SPO URL previously retrieved https://contoso.sharepoint.com. Returning...
Retrieving request digest...
Existing access token still valid. Returning...
Request:
{
"url": "https://contoso-admin.sharepoint.com/_api/contextinfo",
"method": "post",
"headers": {
"common": {
"Accept": "application/json, text/plain, /"
},
"delete": {},
"get": {},
"head": {},
"post": {
"Content-Type": "application/x-www-form-urlencoded"
},
"put": {
"Content-Type": "application/x-www-form-urlencoded"
},
"patch": {
"Content-Type": "application/x-www-form-urlencoded"
},
"user-agent": "NONISV|SharePointPnP|CLIMicrosoft365/6.9.0",
"accept-encoding": "gzip, deflate",
"X-ClientService-ClientTag": "M365CLI:6.9.0",
"accept": "application/json;odata=nometadata",
"authorization": "Bearer "
},
"responseType": "json",
"decompress": true
}
Response:
{
"url": "https://contoso-admin.sharepoint.com/_api/contextinfo",
"status": 200,
"statusText": "OK",
"headers": {
"cache-control": "private, max-age=0",
"transfer-encoding": "chunked",
"content-type": "application/json;odata=nometadata;streaming=true;charset=utf-8",
"expires": "Tue, 06 Jun 2023 09:49:16 GMT",
"last-modified": "Wed, 21 Jun 2023 09:49:16 GMT",
"vary": "Origin,Accept-Encoding",
"p3p": "CP="ALL IND DSP COR ADM CONo CUR CUSo IVAo IVDo PSA PSD TAI TELo OUR SAMo CNT COM INT NAV ONL PHY PRE PUR UNI"",
"x-networkstatistics": "0,16775936,26,250,2357584,5028508,5028508",
"x-sharepointhealthscore": "2",
"x-sp-serverstate": "ReadOnly=0",
"dataserviceversion": "3.0",
"spclientservicerequestduration": "6",
"sprequestduration": "7",
"x-aspnet-version": "4.0.30319",
"x-databoundary": "EU",
"x-1dscollectorurl": "https://eu-mobile.events.data.microsoft.com/OneCollector/1.0/",
"x-ariacollectorurl": "https://eu-mobile.events.data.microsoft.com/Collector/3.0",
"sprequestguid": "89f8bea0-702c-6000-b76d-be4189b1010d",
"request-id": "89f8bea0-702c-6000-b76d-be4189b1010d",
"ms-cv": "oL74iSxwAGC3bb5BibEBDQ.0",
"strict-transport-security": "max-age=31536000",
"x-frame-options": "SAMEORIGIN",
"content-security-policy": "frame-ancestors 'self' teams.microsoft.com *.teams.microsoft.com *.skype.com *.teams.microsoft.us local.teams.office.com teams.microsoftonline.cn *.powerapps.com *.yammer.com *.officeapps.live.com *.office.com *.stream.azure-test.net *.microsoftstream.com *.dynamics.com *.microsoft.com onedrive.live.com *.onedrive.live.com securebroker.sharepointonline.com;",
"x-powered-by": "ASP.NET",
"microsoftsharepointteamservices": "16.0.0.23807",
"x-content-type-options": "nosniff",
"x-ms-invokeapp": "1; RequireReadOnly",
"x-cache": "CONFIG_NOCACHE",
"x-msedge-ref": "Ref A: 8A9154FB802444209D8521F451F97774 Ref B: AMS04EDGE2107 Ref C: 2023-06-21T09:49:16Z",
"date": "Wed, 21 Jun 2023 09:49:15 GMT",
"connection": "close"
},
"data": {
"FormDigestTimeoutSeconds": 1800,
"FormDigestValue": "0xB45E230705564E3BE36E502091BBD7616BCD89B979E04B89589D2BD8B5A68C434A4AF16BBD45837A71A800F1282646D6105E43F1380AF6B8331DD68D79180E6B,21 Jun 2023 09:49:16 -0000",
"LibraryVersion": "16.0.23807.12006",
"SiteFullUrl": "https://contoso-admin.sharepoint.com",
"SupportedSchemaVersions": [
"14.0.0.0",
"15.0.0.0"
],
"WebFullUrl": "https://contoso-admin.sharepoint.com"
}
}
Existing access token still valid. Returning...
Request:
{
"url": "https://contoso-admin.sharepoint.com/_vti_bin/client.svc/ProcessQuery",
"method": "post",
"headers": {
"common": {
"Accept": "application/json, text/plain, /"
},
"delete": {},
"get": {},
"head": {},
"post": {
"Content-Type": "application/x-www-form-urlencoded"
},
"put": {
"Content-Type": "application/x-www-form-urlencoded"
},
"patch": {
"Content-Type": "application/x-www-form-urlencoded"
},
"user-agent": "NONISV|SharePointPnP|CLIMicrosoft365/6.9.0",
"accept-encoding": "gzip, deflate",
"X-ClientService-ClientTag": "M365CLI:6.9.0",
"X-RequestDigest": "0xB45E230705564E3BE36E502091BBD7616BCD89B979E04B89589D2BD8B5A68C434A4AF16BBD45837A71A800F1282646D6105E43F1380AF6B8331DD68D79180E6B,21 Jun 2023 09:49:16 -0000",
"authorization": "Bearer "
},
"responseType": "text",
"decompress": true,
"data": "<Request AddExpandoFieldTypeSuffix="true" SchemaVersion="15.0.0.0" LibraryVersion="16.0.0.0" ApplicationName="CLI for Microsoft 365 v6.9.0" xmlns="http://schemas.microsoft.com/sharepoint/clientquery/2009\"><ObjectPath Id="4" ObjectPathId="3" /><Method Name="EnableCommSite" Id="5" ObjectPathId="3"><Parameter Type="String">https://contoso.sharepoint.com/sites/classicteamsite<Parameter Type="Guid">{d604dac3-50d3-405e-9ab9-d4713cda74ef}<Constructor Id="3" TypeId="{268004ae-ef6b-4e9b-8425-127220d84719}" />"
}
Response:
{
"url": "https://contoso-admin.sharepoint.com/_vti_bin/client.svc/ProcessQuery",
"status": 200,
"statusText": "OK",
"headers": {
"cache-control": "private",
"transfer-encoding": "chunked",
"content-type": "application/json; charset=utf-8",
"vary": "Accept-Encoding",
"p3p": "CP="ALL IND DSP COR ADM CONo CUR CUSo IVAo IVDo PSA PSD TAI TELo OUR SAMo CNT COM INT NAV ONL PHY PRE PUR UNI"",
"set-cookie": [
"SPWorkLoadAttribution=Url=https://contoso-admin.sharepoint.com/_vti_bin/client.svc/ProcessQuery&AppId=E0D3C05D-9133-40D1-8413-1C4522A4E7C2; expires=Wed, 21-Jun-2023 09:49:46 GMT; path=/"
],
"x-networkstatistics": "0,1051136,54,15,5444642,0,1051136",
"x-sharepointhealthscore": "2",
"x-sp-serverstate": "ReadOnly=0",
"spclientservicerequestduration": "16",
"sprequestduration": "17",
"x-aspnet-version": "4.0.30319",
"x-databoundary": "EU",
"x-1dscollectorurl": "https://eu-mobile.events.data.microsoft.com/OneCollector/1.0/",
"x-ariacollectorurl": "https://eu-mobile.events.data.microsoft.com/Collector/3.0",
"sprequestguid": "89f8bea0-803b-6000-c2a5-1a8e2f013ad4",
"request-id": "89f8bea0-803b-6000-c2a5-1a8e2f013ad4",
"ms-cv": "oL74iTuAAGDCpRqOLwE61A.0",
"strict-transport-security": "max-age=31536000",
"x-frame-options": "SAMEORIGIN",
"content-security-policy": "frame-ancestors 'self' teams.microsoft.com *.teams.microsoft.com *.skype.com *.teams.microsoft.us local.teams.office.com teams.microsoftonline.cn *.powerapps.com *.yammer.com *.officeapps.live.com *.office.com *.stream.azure-test.net *.microsoftstream.com *.dynamics.com *.microsoft.com onedrive.live.com *.onedrive.live.com securebroker.sharepointonline.com;",
"x-powered-by": "ASP.NET",
"microsoftsharepointteamservices": "16.0.0.23807",
"x-content-type-options": "nosniff",
"x-ms-invokeapp": "1; RequireReadOnly",
"x-cache": "CONFIG_NOCACHE",
"x-msedge-ref": "Ref A: CD4A51BCFFE741C48D9B015BED53B004 Ref B: AMS04EDGE1607 Ref C: 2023-06-21T09:49:16Z",
"date": "Wed, 21 Jun 2023 09:49:16 GMT",
"connection": "close"
},
"data": "[\r{\r"SchemaVersion":"15.0.0.0","LibraryVersion":"16.0.23807.12006","ErrorInfo":{\r"ErrorMessage":"Method \"EnableCommSite\" does not exist.","ErrorValue":null,"TraceCorrelationId":"89f8bea0-803b-6000-c2a5-1a8e2f013ad4","ErrorCode":-1,"ErrorTypeName":"Microsoft.SharePoint.Client.InvalidClientQueryException"\r},"TraceCorrelationId":"89f8bea0-803b-6000-c2a5-1a8e2f013ad4"\r}\r]"
}
Error: Method "EnableCommSite" does not exist.

CLI for Microsoft 365 version

v6.9.0

nodejs version

v18.16.0

Operating system (environment)

Windows

Shell

PowerShell

cli doctor

{
"os": {
"platform": "win32",
"version": "Windows 10 Enterprise",
"release": "10.0.22000"
},
"cliVersion": "6.9.0",
"nodeVersion": "v18.16.0",
"cliAadAppId": "",
"cliAadAppTenant": "common",
"authMode": "Browser",
"cliEnvironment": "",
"cliConfig": {},
"roles": [],
"scopes": [
"AllSites.FullControl",
"AppCatalog.ReadWrite.All",
"AuditLog.Read.All",
"Bookings.Read.All",
"ChannelMember.ReadWrite.All",
"ChannelMessage.Read.All",
"ChannelMessage.Send",
"ChannelSettings.ReadWrite.All",
"Chat.Read",
"Chat.ReadWrite",
"Directory.AccessAsUser.All",
"Directory.ReadWrite.All",
"ExternalConnection.ReadWrite.All",
"Group.ReadWrite.All",
"IdentityProvider.ReadWrite.All",
"Mail.Read.Shared",
"Mail.ReadWrite",
"Mail.Send",
"Notes.Read.All",
"Place.Read.All",
"Policy.Read.All",
"RecordsManagement.ReadWrite.All",
"Reports.Read.All",
"SecurityEvents.Read.All",
"ServiceHealth.Read.All",
"ServiceMessage.Read.All",
"ServiceMessageViewpoint.Write",
"Tasks.ReadWrite",
"Team.Create",
"TeamMember.ReadWrite.All",
"TeamsAppInstallation.ReadWriteForUser",
"TeamSettings.ReadWrite.All",
"TeamsTab.ReadWrite.All",
"TermStore.ReadWrite.All",
"User.Invite.All",
"User.Read.All",
"User.ReadWrite.All",
"profile",
"openid",
"email",
"AllSites.FullControl",
"AppCatalog.ReadWrite.All",
"AuditLog.Read.All",
"Bookings.Read.All",
"ChannelMember.ReadWrite.All",
"ChannelMessage.Read.All",
"ChannelMessage.Send",
"ChannelSettings.ReadWrite.All",
"Chat.Read",
"Chat.ReadWrite",
"Directory.AccessAsUser.All",
"Directory.ReadWrite.All",
"ExternalConnection.ReadWrite.All",
"Group.ReadWrite.All",
"IdentityProvider.ReadWrite.All",
"Mail.Read.Shared",
"Mail.ReadWrite",
"Mail.Send",
"Notes.Read.All",
"Place.Read.All",
"Policy.Read.All",
"RecordsManagement.ReadWrite.All",
"Reports.Read.All",
"SecurityEvents.Read.All",
"ServiceHealth.Read.All",
"ServiceMessage.Read.All",
"ServiceMessageViewpoint.Write",
"Tasks.ReadWrite",
"Team.Create",
"TeamMember.ReadWrite.All",
"TeamsAppInstallation.ReadWriteForUser",
"TeamSettings.ReadWrite.All",
"TeamsTab.ReadWrite.All",
"TermStore.ReadWrite.All",
"User.Invite.All",
"User.Read.All",
"User.ReadWrite.All",
"AllSites.FullControl",
"AppCatalog.ReadWrite.All",
"AuditLog.Read.All",
"Bookings.Read.All",
"ChannelMember.ReadWrite.All",
"ChannelMessage.Read.All",
"ChannelMessage.Send",
"ChannelSettings.ReadWrite.All",
"Chat.Read",
"Chat.ReadWrite",
"Directory.AccessAsUser.All",
"Directory.ReadWrite.All",
"ExternalConnection.ReadWrite.All",
"Group.ReadWrite.All",
"IdentityProvider.ReadWrite.All",
"Mail.Read.Shared",
"Mail.ReadWrite",
"Mail.Send",
"Notes.Read.All",
"Place.Read.All",
"Policy.Read.All",
"RecordsManagement.ReadWrite.All",
"Reports.Read.All",
"SecurityEvents.Read.All",
"ServiceHealth.Read.All",
"ServiceMessage.Read.All",
"ServiceMessageViewpoint.Write",
"Tasks.ReadWrite",
"Team.Create",
"TeamMember.ReadWrite.All",
"TeamsAppInstallation.ReadWriteForUser",
"TeamSettings.ReadWrite.All",
"TeamsTab.ReadWrite.All",
"TermStore.ReadWrite.All",
"User.Invite.All",
"User.Read.All",
"User.ReadWrite.All"
]
}

Additional Info

Tested PnP PowerShell's Enable-PnPCommSite command on the same site and it worked!

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions