You can use Exchange Online PowerShell and the New-UnifiedGroup cmdlet, which exposes the -SensitivityLabelId parameter. Once a Group is crated, you can team-enable it via the Graph. Alternatively, you can create the Team without assigning a label, and use the Set-UnifiedGroup cmdlet post-creation.
How do you assign the sensitivity label in the creation of a new team with 'New-MgTeam'?
Hi,
We are currently trying to automate requests we get for the creation of a new Team.
In this creation, we want to be able to assign a certain sensitivity label.
In PowerShell, we've got it to generally work with basic information, but we can't seem to figure out which parameter determines the sensitivity label of the team.
This is how our code looks:
And these are the sensitivity labels we have:
We've tried using the '-Classification' parameter with a string value of one of the existing Sensitivity Labels, but then we get a error 400 BadRequest. (Not sure whether that's the correct parameter for this)
Is there a different parameter that should be used?