Public/Get-Customers.ps1
function Get-Customers { [OutputType([Microsoft.Graph.Contract])] Param() process { Connect-CustomerGraph -CustomerTenantId $PartnerTenantId try { $Customers = Get-MgContract -All } catch { Write-Error "Failed to retreive customers from MS Graph: $_" } $Customers } } |