Graph API not allowing to create a Teams from existing HiddenMembership group

Pat Paquin 0 Reputation points
2024-12-05T21:57:49.8466667+00:00

Hi,

I'm at a stand still. We've been creating Microsoft 365 groups (https://graph.microsoft.com/v1.0/groups) with these settings for the past 3 years no issues.

{
    "@odata.context": "https://graph.microsoft.com/v1.0/$metadata#groups/$entity",
    "@microsoft.graph.tips": "Use $select to choose only the properties your app needs, as this can lead to performance improvements. For example: GET groups('<guid>')?$select=assignedLabels,assignedLicenses",
    "id": "...",
    "deletedDateTime": null,
    "classification": null,
    "createdDateTime": "2024-12-05T21:18:28Z",
    "creationOptions": [
        "ExchangeProvisioningFlags:1502"
    ],
    "description": "Français 20241205",
    "displayName": "PatTest-20241205-Français 20241205",
    "expirationDateTime": null,
    "groupTypes": [
        "Unified"
    ],
    "isAssignableToRole": null,
    "mail": "******@xyz.com",
    "mailEnabled": true,
    "mailNickname": "PatTest-20241205",
    "membershipRule": null,
    "membershipRuleProcessingState": null,
    "onPremisesDomainName": null,
    "onPremisesLastSyncDateTime": null,
    "onPremisesNetBiosName": null,
    "onPremisesSamAccountName": null,
    "onPremisesSecurityIdentifier": null,
    "onPremisesSyncEnabled": null,
    "preferredDataLocation": null,
    "preferredLanguage": null,
    "proxyAddresses": [
        "SPO:...",
        "smtp:******@xyz3.com
",
        "smtp:******@xyz2.com",
        "SMTP:******@xyz.com"
    ],
    "renewedDateTime": "2024-12-05T21:18:28Z",
    "resourceBehaviorOptions": [
        "ConnectorsDisabled",
        "SubscribeNewGroupMembers",
        "CalendarMemberReadOnly",
        "SharePointMemberReadonly",
        "WelcomeEmailDisabled",
        "AllowOnlyMembersToPost"
    ],
    "resourceProvisioningOptions": [],
    "securityEnabled": false,
    "securityIdentifier": "...",
    "theme": "Orange",
    "uniqueName": null,
    "visibility": "HiddenMembership",
    "onPremisesProvisioningErrors": [],
    "serviceProvisioningErrors": []
}

All of a sudden, as of mid-September, when I attempt to convert this group to a Teams (https://graph.microsoft.com/v1.0/teams) using the following code (which again has worked for past 3 years)

{
  "******@odata.bind": "https://graph.microsoft.com/v1.0/groups('...')",
  "******@odata.bind": "https://graph.microsoft.com/v1.0/teamsTemplates('standard')",
  "funSettings": {
    "allowGiphy": true,
    "giphyContentRating": "strict",
    "allowStickersAndMemes": true,
    "allowCustomMemes": true
  },
  "guestSettings": {
    "allowCreateUpdateChannels": false,
    "allowDeleteChannels": false
  },
  "memberSettings": {
    "allowCreatePrivateChannels": false,
    "allowCreateUpdateChannels": false,
    "allowDeleteChannels": false,
    "allowAddRemoveApps": false,
    "allowCreateUpdateRemoveTabs": false,
    "allowCreateUpdateRemoveConnectors": false
  },
  "messagingSettings": {
    "allowUserEditMessages": true,
    "allowUserDeleteMessages": true,
    "allowOwnerDeleteMessages": true,
    "allowTeamMentions": true,
    "allowChannelMentions": true
  },
  "channels": [
    {
      "displayName": "Annonces",
      "isFavoriteByDefault": true
    }
  ],
  "installedApps": []
}

I receive the following error:

{
	"error": {
		"code": "BadRequest",
		"message": "Failed to execute Templates backend request CreateTeamFromGroupWithTemplateRequest. Request Url: https://teams.microsoft.com/fabric/amer/templates/api/groups/.../team, Request Method: PUT, Response Status Code: BadRequest, Response Headers: Strict-Transport-Security: max-age=2592000\r\nx-operationid: 9c137eb263e74389894f84229cb0800d\r\nx-telemetryid: 00-0020f88cd325359653d6b47e91409ff2-cfb3290c3c2c7c07-00\r\nX-MSEdge-Ref: Ref A: 5E5153BF4CC94492BE2ACD39CC900240 Ref B: DM2AA1091212029 Ref C: 2024-12-05T21:21:27Z\r\nDate: Thu, 05 Dec 2024 21:21:27 GMT\r\n, ErrorMessage : {\"errors\":[{\"message\":\"'Visibility' is not valid for the given team specialization\",\"errorCode\":\"Unknown\"}],\"operationId\":\"9c137eb263e74389894f84229cb0800d\"}",
		"innerError": {
			"code": "BadRequest",
			"message": "Failed to execute Templates backend request CreateTeamFromGroupWithTemplateRequest. Request Url: https://teams.microsoft.com/fabric/amer/templates/api/groups/6403088d-4761-4045-b14e-c68f277ee457/team, Request Method: PUT, Response Status Code: BadRequest, Response Headers: Strict-Transport-Security: max-age=2592000\r\nx-operationid: 9c137eb263e74389894f84229cb0800d\r\nx-telemetryid: 00-0020f88cd325359653d6b47e91409ff2-cfb3290c3c2c7c07-00\r\nX-MSEdge-Ref: Ref A: 5E5153BF4CC94492BE2ACD39CC900240 Ref B: DM2AA1091212029 Ref C: 2024-12-05T21:21:27Z\r\nDate: Thu, 05 Dec 2024 21:21:27 GMT\r\n, ErrorMessage : {\"errors\":[{\"message\":\"'Visibility' is not valid for the given team specialization\",\"errorCode\":\"Unknown\"}],\"operationId\":\"9c137eb263e74389894f84229cb0800d\"}",
			"details": [
				{
					"code": "Unknown",
					"message": "'Visibility' is not valid for the given team specialization",
					"target": "Templates"
				}
			],
			"date": "2024-12-05T21:21:27",
			"request-id": "9c137eb2-63e7-4389-894f-84229cb0800d",
			"client-request-id": "9c137eb2-63e7-4389-894f-84229cb0800d"
		}
	}
}
'Visibility' is not valid for the given team specialization

Does anyone have this same issue? MS Support so far has not been helpful in diagnosing this issue. The error is misleading because we do not set any team specialization anywhere, and if we do set it as part of the Teams creation, we get this error:

Team Specialization can not be specified as it is inherited from the group

Funny thing is "specialization" is not a property of a group anywhere.

We need the HiddenMembership property set on the group so that our students do not see who are members of these groups.

Does anyone have any insight as to what could be my issue? This code has worked for the past 3 years, I've also tried switching to the Powershell commands (MicrosoftTeams module) which works very well to convert the group to a Teams, I just can't set the channel I need to create to be visible to members by default. It has to be a bug in the Graph API, but seems like I can't get my voice past support.

Microsoft Teams
Microsoft Teams
A Microsoft customizable chat-based workspace.
10,895 questions
Microsoft Graph
Microsoft Graph
A Microsoft programmability model that exposes REST APIs and client libraries to access data on Microsoft 365 services.
13,357 questions
Microsoft Teams Development
Microsoft Teams Development
Microsoft Teams: A Microsoft customizable chat-based workspace.Development: The process of researching, productizing, and refining new or existing technologies.
3,719 questions
{count} votes

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.