Skip to content

Commit 5c483a2

Browse files
committed
Fix AssignedTo property
1 parent 9b6033d commit 5c483a2

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

Modules/CIPPCore/Public/Entrypoints/HTTP Functions/Teams-Sharepoint/Invoke-ListTeamsVoice.ps1

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
using namespace System.Net
22

3-
Function Invoke-ListTeamsVoice {
3+
function Invoke-ListTeamsVoice {
44
<#
55
.FUNCTIONALITY
66
Entrypoint
@@ -24,7 +24,7 @@ Function Invoke-ListTeamsVoice {
2424
Write-Host "Getting page $Skip"
2525
$data = (New-TeamsAPIGetRequest -uri "https://api.interfaces.records.teams.microsoft.com/Skype.TelephoneNumberMgmt/Tenants/$($TenantId)/telephone-numbers?skip=$($Skip)&locale=en-US&top=999" -tenantid $TenantFilter).TelephoneNumbers | ForEach-Object {
2626
Write-Host 'Reached the loop'
27-
$CompleteRequest = $_ | Select-Object *, @{Name = 'AssignedTo'; Expression = { $users | Where-Object -Property id -EQ $_.AssignedTo.id } }
27+
$CompleteRequest = $_ | Select-Object *, @{Name = 'AssignedTo'; Expression = { $users | Where-Object -Property id -EQ $_.TargetId } }
2828
if ($CompleteRequest.AcquisitionDate) {
2929
$CompleteRequest.AcquisitionDate = $_.AcquisitionDate -split 'T' | Select-Object -First 1
3030
} else {

0 commit comments

Comments
 (0)