Create MicrosoftTeams along with APP for your tenant
How to apply permissions to your newly created App
Please collect client id, client secret from created Azure app and tenant id from Azure portal
Permission type | Permissions (from least to most privileged) |
---|---|
Application | Group.Create, Group.ReadWrite.All, Directory.ReadWrite.All |
Group Name: HR, OwnerPrincipalName: AdeleV@contoso.com, AppName: OneNote
OneNote has been added to HR
-GroupId
Specify a GroupId to convert to a Team. If specified, you cannot provide the other values that are already specified by the existing group, namely: Visibility, Alias, Description, or DisplayName. If, for example, you need to create a Team from an existing Microsoft 365 Group, use the ExternalDirectoryObjectId property value returned by Get-UnifiedGroup
Type: String
Position: Named
Default value: None
Accept pipeline input: True
Accept wildcard characters: False
-AppId
Teams App identifier in Microsoft Teams
Type: String
Position: Named
Default value: None
Accept pipeline input: True
Accept wildcard characters: False
Groupname, OwnerPrincipalName, AppName, Client_Id, Client_Secret,Tenantid
To execute CreateTeamsalongwithAPPs
download/copy and paste the script into PowerShell
Provide the input parameters Groupname, OwnerPrincipalName, AppName, Client_Id, Client_Secret, TenantId and hit enter to proceed further on the script
Now the script will redirect to the web page for login
Provide Administrator credentials i.e user ID and password
Press enter to continue
Once you are login it will show the below image for Grant permissions for the app to perform the operations
Click Accept
If you have provided the correct credentials it will give success status admin_consent = True
Now press Y to proceed further in the script
Script will execute and create the Team using provided Group Name, OwnerPrincipalName and APPName
App has been added to the team