Forum Discussion
Issue With Teams PowerShell Module
Outside MSC, I don't believe we can get them to fix something direct by request :D. I don't use the Teams Module and can't speak to your problem, but other than upgrading to V4 (if it has the fix you need), only thing I see is this: https://support.microsoft.com/en-us/office/give-feedback-in-teams-c0fb6297-22af-4db5-b19b-69e0a6720927#:~:text=Select%20Help%20at%20the%20bottom%20lower-left%20of%20Teams,Give%20feedback%20to%20tell%20us%20what%20you%20think.
If you have an O365 business license you can also contact support, but for this I am not sure what could be done other than provide the feedback.
My initial thought was get the UPN from ActiveDirectory Module and pass it to the Teams Module to do what you need, but I assume you're aware of this and there is a reason why you can't leverage it into your scripts. Though as Teams doesn't have UPN I suppose your issue is you can't verify users by UPN between the two because Teams doesn't pull UPN. So in this instance I would select another variable that is consistent and matches, but again, I assume you are aware of this and I am simply typing my thoughts at this point 😛
You've probably come up with your own workaround, but waiting for Microsoft doesn't always pan out well. I'm still waiting on directory services parity some 13 years later.
For anyone else without a workaround, looking at it in "reverse" - from the Team backwards, this is one means you could adjust to suit your specific needs:
Get-Team | % { [PSCustomObject] @{ GroupId = $_.GroupId; DisplayName = (Get-TeamChannel -GroupId $_.GroupId).DisplayName } } | Get-TeamChannelUser | % { Get-MgUser -UserId $_.UserId }
If you're not familiar with Get-MgUser, it's from yet another "Azure AD" PowerShell module (one of many in the Microsoft.Graph set of modules) - the one that's replacing the soon-to-be-decommissioned AzureAD/AzureADPreview set of modules.
Microsoft.Graph.Users Module | Microsoft Docs
Cheers,
Lain