
Phone Number clients also have the option to authenticate with Azure Active Directory Authentication. Var client = new PhoneNumbersClient(connectionString)

Get a connection string to our Azure Communication Services resource. Phone Number clients can be authenticated using connection string acquired from an Azure Communication Services resources in the.
PHONE NUMBERS UPDATE
Update Main function signature to be async. dotnet add package -version 1.0.0Īdd a using directive to the top of Program.cs to include the namespaces. NET package by using the dotnet add package command.
PHONE NUMBERS INSTALL
While still in the application directory, install the Azure Communication PhoneNumbers client library for. dotnet new console -o PhoneNumbersQuickstartĬhange your directory to the newly created app folder and use the dotnet build command to compile your application. This command creates a simple "Hello World" C# project with a single source file: Program.cs. In a console window (such as cmd, PowerShell, or Bash), use the dotnet new command to create a new console app with the name PhoneNumbersQuickstart.
PHONE NUMBERS CODE
On the Numbers page, you will customize the phone number(s) which you'd like to provision.įind the finalized code for this quickstart on GitHub Prerequisites In our example, we've selected a Toll-free number type with Make calls and Send and receive SMS features.įrom here, click the Next: Numbers button at the bottom of the page to customize the phone number(s) you would like to provision. When you've selected a number type, you can then choose the feature. You can select from two phone number types: Local, and Toll-free.
/4248396588_baf974a894_o-5999b084d963ac0010eef5e0.jpg)
PHONE NUMBERS SERIES
The wizard on the Phone numbers blade will walk you through a series of questions that helps you choose the phone number that best fits your scenario. Press the Get button to launch the wizard. Navigate to the Phone Numbers blade in the resource menu. To begin provisioning numbers, go to your Communication Services resource on the Azure portal.

You can configure the AZURE_COMMUNICATION_CONNECTION_STRING environment variable to use Azure CLI phone numbers operations without having to use -connection_string to pass in the connection string. (Optional) Use Azure CLI phone numbers operations without passing in a connection string

Run the following command to get the phone number details for a purchased phone number. az communication phonenumber list -connection-string "" Run the following command to retrieve all of the purchased phone numbers. Operations List purchased phone number(s) You can sign in running the az login command from the terminal and providing your credentials. Create a Communication Services resource.Īdd the Azure Communication Services extension for Azure CLI by using the az extension command. Create an account for free.Īn active Communication Services resource and connection string. An Azure account with an active subscription.
