7 Start Teams as‐a‐code configuration - dcasota/m365-scripts GitHub Wiki

Install the new MS teams client app

March 27th 2024 The recipe to install the new Teams client automatically is described in https://learn.microsoft.com/en-us/microsoftteams/new-teams-vdi-requirements-deploy.

cd $HOME\Downloads
curl -Uri https://statics.teams.cdn.office.net/production-teamsprovision/lkg/teamsbootstrapper.exe -O teamsbootstrapper.exe
curl -Uri https://statics.teams.cdn.office.net/production-windows-x64/enterprise/webview2/lkg/MSTeams-x64.msix -O MSTeams-x64.msix
.\teamsbootstrapper.exe -p -o $HOME\Downloads\MSTeams-x64.msix

Useful weblinks:

License

Since 2023, Teams is separated in Microsoft365. For lab purposes, I activated the Microsoft Teams Introductory Pricing.

image

Add a license to one user.

image

After a logout/login you find Teams in the Admin Center listing.

image

Without a license, the issue might occur "Internal calls to PLS Service have failed. We can't find the tenant region for -. Please try again later.", see https://learn.microsoft.com/en-us/answers/questions/1652292/unable-to-login-microsoft-teams-admin-center-and-a.

After the licensing it may take an hour until https://admin.teams.microsoft.com/dashboard is ready for use.

Create a MS teams team

Assuming that your sharepoint site is up and running, now create a MS Teams team.

Create a MS teams

The first time I've tried to create a MS teams team failed with error 403. That happens when the MS teams service is not configured on the account used. Go to teams.microsoft.com, login with the newly created user account you want to use for administrative purposes. Retry the team creation after a while again. This time, the team has been created.

In addition in the backend, activities automatically have been triggered for the newly created tenant. With the programmatically created Microsoft teams team, a lot of exploration features are added.

Eligible for Microsoft Teams Exploratory license and Microsoft Power Automate free

On the licenses page, a Microsoft Teams Exploratory 100-users-license package has been added, as well as a Microsoft Power Automate Free 10000-users-license package. The user account created for administrative purposes has one sharepoint (Plan) license assigned, one Microsoft Teams Exploratory license assigned and one Microsoft Power Automate Free license assigned.

m365-licenses

On the Teams&groups page, not only the team object has been created, also, there is a new entry called "AllCompany" and a new entry called like the tenant name. The automated creation also tangled the older team objects and they are safely stored for 30 days in 'deleted groups'.

allCompanyteams

On the role assignments pgae, there are 70 Azure AD built-in roles and 13 Exchange roles listed. Azure AD role template holds 89 roles.

On the Resources page, the sites-page lists all sites with its external sharing setting. On the Resources page, the sub-page rooms&equipment obviously is empty. 'Add resource' allows to add a Room or Equipment as resource type.

Powershell with MicrosoftTeams

Microsoft offers a powershell module for MicrosoftTeams administration.

You can find the module on the powershellgallery.

find-module -name MicrosoftTeams

Version    Name                                Repository           Description                                         -------    ----                                ----------           -----------                                         
5.5.0      MicrosoftTeams                      PSGallery            Microsoft Teams cmdlets module for Windows Power... 

Install the module.

install-module -name MicrosoftTeams

In the lab environment, I do bypass the executionpolicy to import the module.

set-executionpolicy -policy bypass
import-module MicrosoftTeams

connect-microsoftteams opens the interactive login windows.

connect-microsoftteams

Account                              Environment Tenant                               TenantId
-------                              ----------- ------                               --------
[email protected] AzureCloud  xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx xxxxxxxx-xxxx-xxxx-xxxx-xxxxx...

The module actually includes 533 commands.

get-command -module MicrosoftTeams