Sp-dev-docs: GroupSiteManager/CreateGroupEx returns null SiteUrl using non-US locale in CreationOptions

Created on 24 Jul 2020  ·  5Comments  ·  Source: SharePoint/sp-dev-docs

Category

  • [x] Bug

Describe the bug

When attempting to create a new team site using the GroupSiteManager REST endpoint and passing the LCID for English UK, 2057 in the CreationOptions property of the request body, the SiteUrl property in the response is set to null, the Microsoft 365 Group is created but the SharePoint Online site is not.

Steps to reproduce

Make the below HTTP request

POST https://contoso.sharepoint.com/_api/GroupSiteManager/CreateGroupEx
{
  displayName: 'Site Name',
  alias: 'sitename',
  isPublic: undefined,
  optionalParams: {
    Description: '',
    CreationOptions: { results: [ 'SPSiteLanguage:2057' ], Classification: '' }
  }
}

Returns the response

{
  "DocumentsUrl": null,
  "ErrorMessage": null,
  "GroupId": "4d27bf51-4d60-4477-a45a-da5e6da6099d",
  "SiteStatus": 1,
  "SiteUrl": null
}

You can find the same behaviour using other LCIDs, although not all. The table below shows some quick testing performed using different LCIDs that work and those that don't.

| LCID | Location | Result |
|-------|-------|-------|
| 1033 | English US | ✅ |
| 1043 | Dutch | ✅ |
| 2057 | English UK | ❌ |
| 3081 | English Australia | ❌ |
| 4105 | English Canada | ❌ |

Expected behavior

Team site is created using the Locale provided in the CreationOptions object

Environment details (development & target environment)

MacOS Catalina, Office 365 CLI

Additional context

This issue was originally discovered using the spo site add command in the Office 365 CLI, see https://github.com/pnp/office365-cli/issues/1728

csorest answered question

All 5 comments

Thank you for reporting this issue. We will be triaging your incoming issue as soon as possible.

After some further investigation, I've noticed that you can select the language from a picker before creating a site in the UI, so my testing appears to be that any LCID used that is not on this list will fail to create the SharePoint site.

I think that's expected... the LCID's listed are those supported by SharePoint Online. If you specify one not supported, it will fail. https://support.microsoft.com/en-us/office/languages-supported-by-sharepoint-dfbf3652-2902-4809-be21-9080b6512fff

Thanks for the reply @andrewconnell

I had a suspicion that would be the case but couldn't find anything to back that up, my Google-fu must have been off that day, so really appreciate you linking to the support doc 👍🏻

We will add in some validation to the CLI command to only allow supported LCIDs.

Issues that have been closed & had no follow-up activity for at least 7 days are automatically locked. Please refer to our wiki for more details, including how to remediate this action if you feel this was done prematurely or in error: Issue List: Our approach to locked issues

Was this page helpful?
0 / 5 - 0 ratings

Related issues

StfBauer picture StfBauer  ·  3Comments

byrongits picture byrongits  ·  3Comments

acksoft picture acksoft  ·  3Comments

bengtmoss picture bengtmoss  ·  3Comments

karishmaTCS picture karishmaTCS  ·  3Comments