Error Creating a Modern SharePoint Site


I am using Plumsail Actions, "Create Modern SharePoint Site" in Flow, and I am currently testing this but I am experiencing an error.

A few notes in advance:

  • I am using a Custom Credentials Key Type
  • The account does not have MFA

I have created the action with the following parameters

To test the connection to Plumsail, I have added a Change SharePoint Permission actions before the Create Modern SharePoint Site action, and this is working fine.

I received the below error on the Create Modern SharePoint Site action every time it is run.

"request": {
"url": null,
"traceId": "0HLR9KP***********5c4642dc"
"error": {
"code": "ApplicationResultException",
"message": "{"error":{"code":"-2147024713, Microsoft.SharePoint.SPException","message":"The group alias already exists."}}",
"date": "2019-11-15T14:46:04.5238774Z"

However it is creating the site in the sharepoint admin center.

Please can you advise?

Hello, @LeeG

Most likely, you get the error because there is an Office 365 group with the same name as you specified in field "Display Name." Modern SharePoint Team site is created with the group and when there is one with a specified name, the conflict occurs. So I would advise you trying another name that was not used earlier.

Hi Plumsail Team,

I have encountered the same bug as described above by @LeeG.

The action takes a lot (4 to 5 minutes), the Office group and SharePoint site are well created by the "Create Modern SharePoint Site" action. Unfortunately, the action terminates always in error and i can't do anything after !

Please help !

Thank you.

Laurent Revel
Office 365 Consultant

1 Like

OK I have done some more work and I am still experiencing issues. I will provide as much information as I can.

  1. SharePoint List with a list of projects
  2. Flow set up as "When an item is created or modified"
    3.Variables setup to clean some data and generate the URL etc
    4.API Key in Plumsail set up using Custom Credentials
  3. Checked that the O365 Group name does not already exist

Here is my flow:

I am getting the following error on the plumsail action (sensitive information redacted)

The full error is:


"request": {
"url": null,
"traceId": "0HLSO5RS0GDSL2BE6f7ec6d8"
"error": {
"code": "ApplicationResultException",
"message": "The remote server returned an error: (401) Unauthorized.",
"date": "2020-01-14T15:51:36.5048546Z"

However the group/site is still created! and working fine!

Please advise, I am using a large number of credits trying to troubleshoot this issue and if I can not get this to work correctly my company and I will have to cancel our subscription and seek an alternative solution. We bought this package specifically for this functionality.

Edit: The plumsail report also shows this action as failed.
14/01/2020 03:50:46 CreateModernSite Failed 1 0HLSO5RS0GDSL2BE6f7ec6d8

Hello, Lee.

I requested update from developers on the initial issue and passed the information you provided. Could you clarify whether the issue occurs from time to time or it's constant? If it's constant, please check the credential you use to create sites in the flow:

  • login to the SharePoint Admin Centre using it and try to create a site
  • if there is no issues, try to create a new API key with the same credential
  • copy the key and update the connector you use to create SP sites in the flow
  • make sure that the action uses the proper connection in the flow

Though the action shouldn't be able to create a site if there is a credential or permission problem, but still let's check it... I will let you know when I get a reply from the developers.


The issue is constant. I have already tried all four points in your reply as part of my own diagnosis. The user account being used is able to create a site with attached O365 group without issues. What I am not sure about is if it is Plumsail or O365 which is reporting the 401. I have provided a traceID in my example, are you able to look at your logs for this action and report what it says?

P.S. It would be very useful if developers such as myself could see logs on the plumsail dashboard so that we could troubleshoot issues such as this much easier.

According to the log record related to the traceID, our server responded 202 Accepted. I have passed to developers your suggestion about embedding of logs into Plumsail account and will consult with them what server responded 401 Unauthorized.

Also, we apologize to you for the issues you had to encounter and add 1,000 additional credits to your account as a compensation. The number of credits will not be reset in the next month if it is not less than 2,000.

Thank you for this. The additional credits are much appreciated. To double check everything I would like to confirm that the account I am using on the API key does not have MFA switched on, and is able to create a modern site from the Admin Centre, and the Office 365 SharePoint UI. I am not a tennant administrator as we are a large organisation using a single tennant, however I do have SharePoint Online administrator access, to this end if there is any more information you require, please let me know and I will arrange this for you.

Lee, could you try to execute this cmdlet via PowerShell? Then, please provide me with results of its execution.


I am happy to run this for you, however this lists site designs for an existing site collection, which site collection should I run this against?

My issue is that I am getting the error when creating new sites (now a modern site is a site collection) so they will not have any site designs applied.


Please run the cmdlet against the sites that were created by the failed action and by you via SP interface both.