Dec 20 2020 08:28 PM - edited Dec 21 2020 08:24 PM
Hello All,
Actually We have enabled 'Group Naming policy' on our O365 tenant like below:
Current Policy:
<Group name>(<Company>)
It works perfectly fine when we create Teams through Teams App but we are facing below error
when we try to create through CSOM based (c#) provisioning console job. To fit in naming policy we
are fetching user's company name and appending suffix to Group name. Ex. TestTeam(CompanyName)
Error Message:
Code: Request_BadRequest Message: The property is missing a required prefix/suffix per your organization's Group naming requirements. Details: Detail0: Code: MissingPrefixSuffix Target: displayName AdditionalData: suggestedPropertyValue : sid-12-18-2021(MyCompany)()
Below source code we are referring to create Teams:
UnifiedGroupEntity unifiedGroupEntity = UnifiedGroupsUtility.CreateUnifiedGroup(
unifiedGroupInformation.DisplayName, unifiedGroupInformation.Description,
unifiedGroupInformation.MailNickname, accessToken, unifiedGroupInformation.Owners,null,
true, true, 10, 500);
Please let me know where the things getting wrong.
BR/ Sid
Dec 22 2020 12:55 AM - edited Dec 22 2020 12:57 AM
@SiddheshwarKohale , There are some strict guidelines that are to be followed when creating a group policy in azure active directory that enforces consistent naming conventions for Microsoft 365 groups created or edited by your users, set up a group naming policy for your organizations in Azure Active Directory (Azure AD).
I would suggest you to refer to your naming policies in your AAD and use the same to create a group using console job. As from your error it's clear that there is some format error in prefix and suffix.
Please follow this article for more details.
Also check if the data is already filled in object in code before creating a team
Dec 31 2020 01:48 AM
@Manish-MSFT - We are already using C# based console job to create Teams. Below are few more details:
Azure AD Group Policy:
Error Message:
Stack Trace:
UnifiedGroupInformation Payload is like this before creating Teams:
Code snippet:
Still we are facing similar issue. Please suggest possible solutions if any.
Thanks.
BR. Sid
Jan 12 2021 06:58 AM
@SiddheshwarKohale : We are looking into this issue, and will update you once I receive any update from internal developers team.
Jan 17 2021 09:54 PM
Jan 18 2021 03:27 AM - edited Jan 18 2021 03:32 AM
@SiddheshwarKohale : Hi Sid, can we discuss this over a call? Please write to us microsoftteamsdev@microsoft.com
Jan 19 2021 03:13 AM
Jan 21 2021 01:50 AM
@SiddheshwarKohale , As discussed over the call, please forward us the required steps for repro. The steps must be clear such that we can repro and file a bug.
Feb 01 2021 07:45 PM