Forum Discussion

ahmadkh_ju's avatar
ahmadkh_ju
Copper Contributor
Feb 21, 2021

create mant teams use graph api

hello all

I want to create am multi teams in one shot using graph api

I have Microsoft code but its only create one team each press how to create many teams through loop for example

this is the code what is the modification needed to generate 100 teams for example

 public async Task<ActionResult> PostGroupAction(FormOutput data)
        {
            return await WithExceptionHandlingAsync(

            async token =>
            {
  
                     Group group = await graphService.CreateNewTeamAndGroup(token, data.DisplayNameInput, data.MailNicknameInput, data.DescriptionInput);
                var teams = (await graphService.GetMyTeams(token)).ToArray();
                return new FormOutput()
                {
                    Teams = teams,
                    ShowTeamOutput = true
                };

            }
            );

        }

 

 im new in this issue thank you very much

No RepliesBe the first to reply

Resources