Microsoft Graph Api - Create team Visibility : HiddenMembership error

%3CLINGO-SUB%20id%3D%22lingo-sub-1922405%22%20slang%3D%22en-US%22%3EMicrosoft%20Graph%20Api%20-%20Create%20team%20Visibility%20%3A%20HiddenMembership%20error%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1922405%22%20slang%3D%22en-US%22%3E%3CP%3EHi.%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%3CSPAN%3EI've%20been%20create%20a%20team%20using%20this%20code%20in%20c%23%2C%20using%20Microsoft%20Graph%20Api.%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CPRE%20class%3D%22lia-code-sample%20language-applescript%22%3E%3CCODE%3Evar%20additionalData%20%3D%20new%20Dictionary%3CSTRING%3E()%20%7B%0A%20%20%20%20%7B%0A%20%20%20%20%20%20%20%20%22template%40odata.bind%22%2C%0A%20%20%20%20%20%20%20%20%22https%3A%2F%2Fgraph.microsoft.com%2Fbeta%2FteamsTemplates('educationClass')%22%0A%20%20%20%20%7D%2C%20%7B%0A%20%20%20%20%20%20%20%20%22owners%40odata.bind%22%2C%0A%20%20%20%20%20%20%20%20new%20List%3CSTRING%3E()%0A%20%20%20%20%7D%0A%7D%3B%0A(additionalData%5B%22owners%40odata.bind%22%5D%20as%20List%20%26lt%3B%20string%20%26gt%3B).Add(%22https%3A%2F%2Fgraph.microsoft.com%2Fv1.0%2Fusers%2F%22%20%2B%20ownId)%3B%0Avar%20team%20%3D%20new%20Team%20%7B%0A%20%20%20%20DisplayName%20%3D%20displayName%2C%0A%20%20%20%20Description%20%3D%20description%2C%0A%20%20%20%20AdditionalData%20%3D%20additionalData%0A%7D%3B%0Aawait%20graphClient%0A%20%20%20%20.Teams%0A%20%20%20%20.Request()%0A%20%20%20%20.AddAsync(team)%3B%3C%2FSTRING%3E%3C%2FSTRING%3E%3C%2FCODE%3E%3C%2FPRE%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%3CSPAN%3EBut%20there%20was%20an%20error%20all%20of%20a%20sudden%20today.%26nbsp%3BAs%20follows%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CPRE%20class%3D%22lia-code-sample%20language-applescript%22%3E%3CCODE%3ETeam%20Definition.%20Visibility'%20should%20be%20equal%20to%20'HiddenMembership'%3C%2FCODE%3E%3C%2FPRE%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%3CSPAN%3ESo%20I%20set%20the%20Visibility%20option.%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CPRE%20class%3D%22lia-code-sample%20language-applescript%22%3E%3CCODE%3EVisibility%20%3D%20TeamVisibilityType.HiddenMembership%3C%2FCODE%3E%3C%2FPRE%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%3CSPAN%3EBut%20error%20occured%20like%20this..%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CPRE%20class%3D%22lia-code-sample%20language-applescript%22%3E%3CCODE%3ETeam%20Visibility%20must%20be%20one%20of%20known%20types%3A%20%5BPrivate%2CPublic%2CHiddenMembership%5D%3C%2FCODE%3E%3C%2FPRE%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%3CSPAN%3EThere%20is%20also%20no%20information%20on%20'HiddenMemberhip'%20in%20%3CA%20href%3D%22https%3A%2F%2Fdocs.microsoft.com%2Fen-us%2Fgraph%2Fapi%2Fresources%2Fteamvisibilitytype%3Fview%3Dgraph-rest-beta%22%20target%3D%22_self%22%20rel%3D%22noopener%20noreferrer%22%3Ethis%20document.%3C%2FA%3E%3C%2FSPAN%3E%3C%2FP%3E%3CP%3EThe%20Visual%20studio%20nuget%20manager%20also%20upgraded%20to%20the%20latest%20beta%20version.%3C%2FP%3E%3CP%3ELicense%20is%20Education%20A1.%3C%2FP%3E%3CDIV%3E%3CSPAN%3EI%20don't%20know%20what's%20going%20on%20here.%20Any%20way%20is%20fine%2C%20so%20please%20help%20me..%3C%2FSPAN%3E%3C%2FDIV%3E%3CDIV%3E%26nbsp%3B%3C%2FDIV%3E%3CDIV%3E%3CSPAN%3EThanks%3C%2FSPAN%3E%3C%2FDIV%3E%3C%2FLINGO-BODY%3E%3CLINGO-LABS%20id%3D%22lingo-labs-1922405%22%20slang%3D%22en-US%22%3E%3CLINGO-LABEL%3ECreate%20Team%3C%2FLINGO-LABEL%3E%3CLINGO-LABEL%3EDeveloper%3C%2FLINGO-LABEL%3E%3CLINGO-LABEL%3EMicrosoft%20Teams%3C%2FLINGO-LABEL%3E%3C%2FLINGO-LABS%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1924297%22%20slang%3D%22en-US%22%3ERe%3A%20Microsoft%20Graph%20Api%20-%20Create%20team%20Visibility%20%3A%20HiddenMembership%20error%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1924297%22%20slang%3D%22en-US%22%3EHi%2C%3CBR%20%2F%3EWe%20have%20the%20same%20issue%20since%20yesterday.%3CBR%20%2F%3EWe'll%20keep%20you%20posted%20if%20we%20find%20a%20solution.%20Please%20do%20the%20same%20%3A)%3C%2Fimg%3E%3CBR%20%2F%3ERegards%3C%2FLINGO-BODY%3E
Occasional Contributor

Hi. 

 

I've been create a team using this code in c#, using Microsoft Graph Api.

 

var additionalData = new Dictionary<string, object>() {
    {
        "template@odata.bind",
        "https://graph.microsoft.com/beta/teamsTemplates('educationClass')"
    }, {
        "owners@odata.bind",
        new List<string>()
    }
};
(additionalData["owners@odata.bind"] as List < string >).Add("https://graph.microsoft.com/v1.0/users/" + ownId);
var team = new Team {
    DisplayName = displayName,
    Description = description,
    AdditionalData = additionalData
};
await graphClient
    .Teams
    .Request()
    .AddAsync(team);

 

 

 

But there was an error all of a sudden today. As follows

 

Team Definition. Visibility' should be equal to 'HiddenMembership'

 

 

 

So I set the Visibility option.

 

Visibility = TeamVisibilityType.HiddenMembership

 

But error occured like this..

 

Team Visibility must be one of known types: [Private,Public,HiddenMembership]

 

 

There is also no information on 'HiddenMemberhip' in this document.

The Visual studio nuget manager also upgraded to the latest beta version.

License is Education A1.

I don't know what's going on here. Any way is fine, so please help me..
 
Thanks
13 Replies
Hi,
We have the same issue since yesterday.
We'll keep you posted if we find a solution. Please do the same :)
Regards

@Maxime Pelletier @BoHyun Same issue here! Everything was working just a few days ago.

I get the same also by using Graph Explorer. 

stefanpe_0-1606168971373.png

 

Same problem here... we really need this.
Please keep us updated.
I'm having the same issue, I think creating the group first and then applying a Teams template to it might be a workaround while waiting on a fix to the beta endpoints: https://docs.microsoft.com/en-us/graph/api/team-post?view=graph-rest-beta&tabs=http#example-4-create...

Before this problem, I hadn't realised you could create a templated team from an existing group. I haven't tried yet, but hope it works as have a lot of people waiting on Teams being created from a recent change in timetables. my only worry is i know that the educationClass template with Teams usually applies a number of settings on the underlying created 365 group, like not sending out the email for users joining, etc.

@JElliott242 

 

Seems to be a reasonable temporary solution.

Can you keep us updated about the outcomes of your tests?

Would be very apreciated.

 

I will do the same if I find the time to test it myself.

 

@JElliott242 
But can you add a class notebook to a team that wasn't created with an educationClass template?

@SteveDubois 

 

I created a group with matching settings (HiddenMembership, autosubscribe, etc) and then tried to create a Team using that group and the educationClass template, no joy =(

POST:

 

{
  "template@odata.bind":"https://graph.microsoft.com/beta/teamsTemplates('educationClass')",
  "group@odata.bind":"https://graph.microsoft.com/v1.0/groups('groupid')"
}

 

Response:

 

{
    "error": {
        "code": "BadRequest",
        "message": "Failed to execute Templates backend request CreateTeamFromGroupWithTemplateRequest. Request Url: https://teams.microsoft.com/fabric/emea/templates/api/groups/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/team, Request Method: PUT, Response Status Code: BadRequest, Response Headers: Strict-Transport-Security: max-age=2592000\r\nx-operationid: xxxxxxxxxxxx\r\nx-telemetryid: 00-xxxxxxxxxxxx-xxxxxxxxxxxx-00\r\nX-MSEdge-Ref: Ref A: xxxxxxxxxxxx Ref B: DB3EDGE1609 Ref C: 2020-11-24T12:29:42Z\r\nDate: Tue, 24 Nov 2020 12:29:42 GMT\r\n, ErrorMessage : {\"errors\":[{\"message\":\"Team Visibility can not be specified as it is inherited from the group.\"}],\"operationId\":\"xxxxxxxxxxxx\"}",
        "innerError": {
            "date": "2020-11-24T12:29:42",
            "request-id": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
            "client-request-id": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"
        }
    }
}

 

 

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

 

So, even though I'm not specifying visibility in the creation request, it's picking up HiddenMembership from the pre-created group and somehow it's interfering with the template.  Well and truly messed up it seems.  

 

I haven't tried creating a class from just Teams (without using Graph) but I wonder if it's having the same issues.

 

I hope that the solution here isn't to create a class through the /education endpoint that then gets a team created for it by the teacher.

 

quick edit: I also tested this on the v1.0 graph API with the same errors.  so, this is not just a "beta" issue, it's affecting production endpoints as well.

Looking at the Service health area of the 365 admin center, i can also see that this issue is somewhat covered by an advisory. i don't know how to post links to official service health area, but the university of pennsylvania is mirroring it on their site: https://mailservices.isc.upenn.edu/computing/email/penno365/alerts/ms-incidents.html id: TM2274400

Admins are unable to create teams using the Microsoft Graph API when a group is specified
TM227440, Microsoft Teams, Last updated: November 24, 2020 4:27 AM
Start time: November 23, 2020 11:07 PM

@JElliott242 

 

I can still create Education Teams with Teams Powershell-Module. I've tried to find the type of requist the Module is sending with fiddler, but I can't figure it out yet :)

thank you! I didn't think of trying that. I've also managed to create some Teams via powershell with educlass

@BoHyun @JElliott242 @Sjoerd1185 @SteveDubois @Matt-Hurford @Maxime Pelletier Good news: now everything works again as a few days ago!! I just noticed that the issue "TM2274400" was closed by Microsoft. I tried again using my PowerShell + Graph code for creating EducationClass teams: it works!

Hi. @BoHyun 

 

Try with the v1.0 and make the request in the following way: 

 

{
 "template@odata.bind":"https://graph.microsoft.com/v1.0/teamsTemplates('educationClass')", 
  "displayName":"My Sample Team",
  "description":"My Sample Team’s Description", 
  "members":[ 
     { 
       "@odata.type":"#microsoft.graph.aadUserConversationMember",
       "roles":[ "owner" ], 
       "user@odata.bind":"https://graph.microsoft.com/v1.0/users('xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx')" 
      }
   ] 
}