Microsoft Teams PowerShell Module 4.7.1-Preview with AzureAD App and Certificate Authentication
Hi All,
A few days ago the Microsoft Teams PowerShell Module 4.7.1-Preview was released. For me a long awaited Feature with Azure AD App Authentication with a Certificate is now partly possible.
MicrosoftTeams 4.7.1-preview
Microsoft Teams PowerShell Release Notes
Application-based authentication in Teams PowerShell Module
To install the Preview Side by Side with the 4.7.0 Module you need to add the -Force Parameter
Get-InstalledModule MicrosoftTeams
Find-Module MicrosoftTeams -AllowPrerelease
Install-Module MicrosoftTeams -AllowPrerelease -Force
Get-InstalledModule MicrosoftTeams -AllVersions
The following Permissions are Required for the Teams Commandlets
- User.Read.All
- Group.ReadWrite.All
- AppCatalog.ReadWrite.All
- TeamSettings.ReadWrite.All
- Channel.Delete.All
- ChannelSettings.ReadWrite.All
- ChannelMember.ReadWrite.All
After you have addet the Permissions you need to Grant Admin Consent
For the *-CS Commandlets you need to add the Azure AD App to the "Skype for Business Administrators" Role
Now we are ready to connect
$AppID = "93b64305-ea5b-41f2-be0f-a2235fb91480" #DemoTeamsPS
$TenantId = "icewolfch.onmicrosoft.com"
$CertificateThumbprint = "4F1C474F862679EC35650824F73903041E1E5742"
Import-Module MicrosoftTeams
Connect-MicrosoftTeams -ApplicationId $AppID -TenantId $TenantId -CertificateThumbprint $CertificateThumbprint
Some Test Commandlets
Get-Team
Get-CsOnlineUser -Identity a.bohren@icewolf.ch | fl *Ent*,*host*,*voice*, *line*
Get-CsOnlineUser -Identity a.bohren@icewolf.ch | fl *Ent*,*host*,*voice*, *line*
For now only a few *-CS commandleds are working, but i guess soon the rest will follow
All Non *-Cs cmdlets (for example, Get-Team), Get-CsTenant, Get-CsOnlineUser, Get-CsOnlineVoiceUser & *-CsOnlineSipDomain cmdlets are already supported. Other cmdlets will be gradually rolled out.
For all other cmdlets you will receive an "Access Denied" Error Message
Regards
Andres Bohren