Forum Discussion
Markus_Johansson
Sep 09, 2022Iron Contributor
How to retrieve all Teams enabled rooms with powershell
Hey. Seems Get-CsMeetingRoom has been depricated. How to retrieve all Teams enabled meeting rooms with powershell?
- Oct 04, 2022
Hi,
You can use Graph API :
$uri = "https://graph.microsoft.com/beta/teamwork/devices?$filter=deviceType eq 'TeamsRoom'"$RoomsList = (Invoke-RestMethod -Uri $uri -Headers $authTokenTeams -Method Get).valuehttps://learn.microsoft.com/en-us/graph/api/teamworkdevice-list?view=graph-rest-beta&tabs=httpNeed to create an app registration to get an authtoken, i've used the powershell Intune samples scripts to request authToken, just need to change $clientID in Get-AuthToken function to match your App Registration in the 😉 https://github.com/microsoftgraph/powershell-intune-sampleshttps://github.com/microsoftgraph/powershell-intune-samples
Markus_Johansson
Sep 12, 2022Iron Contributor
Hey, thanks for the input. Unfortunately MTREnabled is not automatically updated. I guess this needs to be set "manually" by admin.
License it not good for my current customer 😞
License it not good for my current customer 😞
Eric TELLIER
Oct 04, 2022Copper Contributor
Hi,
You can use Graph API :
$uri = "https://graph.microsoft.com/beta/teamwork/devices?$filter=deviceType eq 'TeamsRoom'"
$RoomsList = (Invoke-RestMethod -Uri $uri -Headers $authTokenTeams -Method Get).value
https://learn.microsoft.com/en-us/graph/api/teamworkdevice-list?view=graph-rest-beta&tabs=http
Need to create an app registration to get an authtoken, i've used the powershell Intune samples scripts to request authToken, just need to change $clientID in Get-AuthToken function to match your App Registration in the 😉 https://github.com/microsoftgraph/powershell-intune-samples
https://github.com/microsoftgraph/powershell-intune-samples
- Markus_JohanssonOct 14, 2022Iron ContributorThanks, also found this article.
https://pnp.github.io/blog/post/manage-teams-devices-in-graph/- Markus_JohanssonJan 23, 2023Iron ContributorSeems this one works now.
Get-MgBetaTeamworkDevice -all