Skip to content

Execute the code of the help document to create the team and return the error message [The navigation bind for the user was missing in request]. How to solve it? #380

Open
@real-liyongsheng

Description

@real-liyongsheng

Execute the code of the help document to create the team and return the error message [The navigation bind for the user was missing in request]. How to solve it?

https://docs.microsoft.com/en-us/graph/api/team-post?view=graph-rest-1.0&tabs=http

IGraphServiceClient graphClient = GraphServiceClient.builder().authenticationProvider( authProvider ).buildClient();

Team team = new Team();
team.additionalDataManager().put("template@odata.bind", new JsonPrimitive("https://graph.microsoft.com/v1.0/teamsTemplates('standard')"));
team.displayName = "My Sample Team";
team.description = "My Sample Team’s Description";
LinkedList<ConversationMember> membersList = new LinkedList<ConversationMember>();
AadUserConversationMember members = new AadUserConversationMember();
LinkedList<String> rolesList = new LinkedList<String>();
rolesList.add("owner");
members.roles = rolesList;
members.userId = "0040b377-61d8-43db-94f5-81374122dc7e";
membersList.add(members);
ConversationMemberCollectionResponse conversationMemberCollectionResponse = new ConversationMemberCollectionResponse();
conversationMemberCollectionResponse.value = membersList;
ConversationMemberCollectionPage conversationMemberCollectionPage = new ConversationMemberCollectionPage(conversationMemberCollectionResponse, null);
team.members = conversationMemberCollectionPage;

graphClient.teams()
	.buildRequest()
	.post(team);

AB#6998

Metadata

Metadata

Assignees

No one assigned

    Labels

    ADO to GitHub automation labelIssue caused by core project dependency modules or libraryarea: javaissues with java code samplesarea: snippets-generationDescribes a required fix to the snippet generator

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions