Note

Access to this page requires authorization. You can try signing in or .

Access to this page requires authorization. You can try .

Get-CsOnlineTelephoneNumberOrder

Use the Get-CsOnlineTelephoneNumberOrder cmdlet to get the order report of a specific telephone number order.

Syntax

Default (Default)

Get-CsOnlineTelephoneNumberOrder
 -OrderId <String>
 [-OrderType <String>]
 [<CommonParameters>]

Description

This Get-CsOnlineTelephoneNumberOrder cmdlet can be used to get the status of specific telephone number orders. Currently supported orders for retrievals are: Search New-CsOnlineTelephoneNumberOrder, Direct Routing Number Upload New-CsOnlineDirectRoutingTelephoneNumberUploadOrder, Direct Routing Number Release New-CsOnlineTelephoneNumberReleaseOrder, and SMS Activation/Deactivation. When the OrderType is not indicated, the cmdlet will default to a Search order.

Examples

Example 1

PS C:\> $order = Get-CsOnlineTelephoneNumberOrder -OrderType Search -OrderId 1fd52b3b-b804-4ac4-a84d-4d70b51dd4be

Key Value
--- -----
Id 1fd52b3b-b804-4ac4-a84d-4d70b51dd4be
Name Postal Code Search Test
CreatedAt 2024-11-30T00:34:00.0825627+00:00
CreatedBy ContosoAdmin
Description Postal Code Search Test
NumberType UserSubscriber
SearchType PostalCode
AreaCode 778
PostalOrZipCode V7Y 1G5
Quantity 2
Status Reserved
IsManual False
TelephoneNumbers {System.Collections.Generic.Dictionary`2[System.String,System.Object], System.Collections.Generic.Dictionary`2[System.String,System.Object]}
ReservationExpiryDate 2024-11-30T00:50:01.1794152+00:00
ErrorCode NoError
InventoryType Subscriber
SendToServiceDesk False
CountryCode CA

PS C:\> $order.TelephoneNumbers

Key Value
--- -----
Location Vancouver
TelephoneNumber +16046606034
Location Vancouver
TelephoneNumber +16046606030

This example returns a successful telephone number search and the telephone numbers are reserved for purchase.

Example 2

PS C:\> $order = Get-CsOnlineTelephoneNumberOrder -OrderType Search -OrderId 8d23e073-bc98-4f73-8e05-7517655d7042

Key Value
--- -----
Id 8d23e073-bc98-4f73-8e05-7517655d7042
Name Postal Code Search Test
CreatedAt 2024-11-30T00:34:00.0825627+00:00
CreatedBy ContosoAdmin
Description Prefix Search Test
NumberType UserSubscriber
SearchType Prefix
AreaCode
PostalOrZipCode
Quantity 1
Status Error
IsManual False
TelephoneNumbers {}
ReservationExpiryDate
ErrorCode OutOfStock
InventoryType Subscriber
SendToServiceDesk False
CountryCode

This example returns a failed telephone number search and the ErrorCode is showing that telephone numbers with NumberPrefix: 1425 is OutOfStock.

Example 3

PS C:\> Get-CsOnlineTelephoneNumberOrder -OrderId 1fd52b3b-b804-4ac4-a84d-4d70b51dd4be

Key Value
--- -----
Id 1fd52b3b-b804-4ac4-a84d-4d70b51dd4be
Name Postal Code Search Test
CreatedAt 2024-11-30T00:34:00.0825627+00:00
CreatedBy TNM
Description Postal Code Search Test from Postman
NumberType UserSubscriber
SearchType PostalCode
AreaCode 778
PostalOrZipCode V7Y 1G5
Quantity 2
Status Expired
IsManual False
TelephoneNumbers {System.Collections.Generic.Dictionary`2[System.String,System.Object], System.Collections.Generic.Dictionary`2[System.String,System.Object]}
ReservationExpiryDate 2024-11-30T00:50:01.1794152+00:00
ErrorCode NoError
InventoryType Subscriber
SendToServiceDesk False
CountryCode CA

When the OrderType is not indicated, the cmdlet will default to a Search order. This example returns a successful telephone number search and the telephone numbers are reserved for purchase.

Example 4

PS C:\> Get-CsOnlineTelephoneNumberOrder -OrderType Release -OrderId 6aa4f786-8628-4923-9df1-896f3d84016c

Key Value
--- -----
OrderId 6aa4f786-8628-4923-9df1-896f3d84016c
CreatedAt 2024-11-27T06:44:26.1975766+00:00
Status Complete
TotalCount 3
SuccessCount 3
FailureCount 0
SuccessPhoneNumbers {+12063866355, +12063868075, +12063861642}
FailedPhoneNumbers {}

This example returns the status of a successful release order for Direct Routing telephone numbers.

Example 5

PS C:\> Get-CsOnlineTelephoneNumberOrder -OrderType DirectRoutingNumberCreation -OrderId faef09f7-5bd5-4740-9e76-9a5762380f34

Key Value
--- -----
OrderId faef09f7-5bd5-4740-9e76-9a5762380f34
CreatedAt 2024-11-30T00:22:59.4989508+00:00
Status Success
TotalCount 1
SuccessCount 1
FailureCount 0
WarningCount 0
FailedPhoneNumbers {}
WarningPhoneNumbers {}
SuccessPhoneNumbers {+99999980}

This example returns the status of a successful upload order for a Direct Routing phone number.

Example 6

PS C:\> $results = Get-CsOnlineTelephoneNumberOrder -OrderId acf9d459-083b-4f8e-b365-c0a07817b879 -OrderType NumberUpdate

Key Value
--- -----
OrderId 4b9cbc43-5bd5-4740-9e76-9a5762380f9d
CreatedAt 2025-10-30T00:22:59.4989508+00:00
Status PartialSuccess
TotalCount 4
SuccessCount 3
FailureCount 1
WarningCount 0
SuccessPhoneNumbers {+12345678910, +1253489001, +14579824781}
FailedPhoneNumbers {+100001}
WarningPhoneNumbers {}
AdditionalDetails	{System.Collections.Generic.Dictionary`2[System.String,System.Object]}

PS C:\> $results.AdditionalDetails

Key Value
--- -----
TelephoneNumber +100001
Status 	 Error
Message				 The Number is not found.

This example returns the status of a partially successful NumberUpdate order for a telephone number tags.

Example 7

PS C:\> $results = Get-CsOnlineTelephoneNumberOrder -OrderId 0fba1633-81f0-435d-b0a8-81d073cc6f29 -OrderType SmsActivation

Key Value
--- -----
OrderId 0fba1633-81f0-435d-b0a8-81d073cc6f29
Status PendingTelcoCallback
OrderType SmsActivation
CreatedAt 1/6/2026 7:28:09 PM +00:00
CreatedBy UNATTRIBUTED
TelephoneNumbers {System.Collections.Generic.Dictionary`2[System.String,System.Object]}

PS C:\> $results.TelephoneNumbers

Key Value
--- -----
TelephoneNumber +12065555555

This example returns the status of an in progress SMS Activation order.

Example 8

PS C:\> $results = Get-CsOnlineTelephoneNumberOrder -OrderId 0fba1633-81f0-435d-b0a8-81d073cc6f29 -OrderType NumberUsageUpdate

Key Value
--- -----
OrderId 0fba1633-81f0-435d-b0a8-81d073cc6f29
Status Success
ErrorMessage
OrderType NumberUsageUpdate
CreatedAt 1/6/2026 7:28:09 PM +00:00
CreatedBy UNATTRIBUTED
TelephoneNumbers {System.Collections.Generic.Dictionary`2[System.String,System.Object]}

PS C:\> $results.TelephoneNumbers

Key Value
--- -----
TelephoneNumber +12065555555

This example returns the status of a successful Number Usage Update order.

Parameters

-OrderId

Use the OrderId received as output of your order creation cmdlets.

Parameter properties

Type:String
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

-OrderType

Specifies the type of telephone number order to look up. Valid values are Search, Release, DirectRoutingNumberCreation, and SmsActivation. You can use SmsActivation to find orders for both activating and deactivating SMS. The default value is Search.

Parameter properties

Type:String
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

CommonParameters

This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutBuffer, -OutVariable, -PipelineVariable, -ProgressAction, -Verbose, -WarningAction, and -WarningVariable. For more information, see about_CommonParameters.

Notes

Updates in Teams PowerShell Module version 6.7.1 and later:

  • A new optional parameter OrderType is introduced. If no OrderType is provided, it will default to a Search order.
  • [BREAKING CHANGE] When a Search order is queried, the property name TelephoneNumber in the output will be changed to TelephoneNumbers. The structure of the TelephoneNumbers output will remain unchanged.
    • Impact: Scripts and processes that reference the TelephoneNumber property will need to be updated to use TelephoneNumbers.

Related Links


Feedback

Was this page helpful?