Error Creating a Modern SharePoint Site

Hi,

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
Claranet

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:
flow%20diagram

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.

Hello.

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.

Hello,

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.

Lee

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

Lee, do you have any updates?

Hello,

Sorry for the delay in my reply.

I have run the command as advised and here are the results.

  • On a site created directly in the UI by the account registered in the Plumsail API I get no output.
  • On a site created via the failed Plumsail Action, by the account in the Plumsail API I get no output.
  • As an extra check, I ran the same commandlet against a site that I know has a custom site design, and I recieve the expected output with the custom site design ID etc.

Lee

Hello, Lee.

Thank you for checking. I've passed the information to developers and we continue researching.

Hello.

Do we have an update on this? This is part of a major project for our business and I am receiving pressure to get this issue resolved. If there is any more information you need please let me know.

Lee

Lee, I have requested updates on this and will inform you as soon as possible.

I'm sorry but I can tell nothing specific. =(

The developers are notified about your circumstances but still they need more time for researching. I will keep you posted.

Hello,

Having not changed anything since my last attempt I ran another test just now on the off-chance that it worked, and it did!

Although it took a long time to run 1m 30s the action did complete successfully. I would be interested to see what is different from my previous attempts.

Lee

Hello, Lee. Recently, we released a fix but it affected creation of sites without groups. Perhaps, it helped in your case too. Could you confirm that all further flow runs go without issues?

Hi.

I just tried another run of the flow and the Plumsail dashboard shows success:

|Date|Action|Status|Credits|JobId|
|31/01/2020 09:02:39|CreateModernSite|Success|1|0HLT5QCS8M2PL9C02f09e0ac|

However the flow failed after 8 minutes with the error:

},
  "error": {
    "code": "ApplicationResultException",
    "message": "The group alias already exists. Please choose another one.",
    "date": "2020-02-04T12:14:12.297869Z"
  }
}

I double checked that the site did not already exist before I ran the flow. I have checked the SharePoint admin centre and it has been created successfully.

Lee