Azure communication Service-OTP based

Rakesh 0 Reputation points
2026-09-11T11:55:41.1533333+00:00

Dear Team,

I have a new requirement from one of my customers, the have their own mobile number, now they want to sent the OTP to that mobile number for their own custom build application. When a user wants to login/modify or do some change i the application then an OTP should come to the given number and then allow.

Pls help.

Azure Communication Services
0 comments No comments

1 answer

Sort by: Most helpful
  1. Allan Solomon Mejia 8,000 Reputation points
    2026-09-11T19:54:48.9533333+00:00

    Hello @Rakesh

    Yes, you can use Azure Communication Services (ACS) SMS to send an OTP to a user's mobile number from your custom application.

    The typical flow would be:

    User requests login/change → your backend generates an OTP → ACS sends the OTP by SMS → user enters the OTP → your backend validates it → the requested action is allowed

    One important point: ACS provides SMS delivery; it doesn't manage the OTP lifecycle for your application. If you implement this yourself, your backend needs to securely generate the OTP, associate it with the user/session, set a short expiration time, limit retries/resends, prevent reuse, and validate it before authorizing the operation.

    You would normally acquire/configure an SMS-capable sender number in your ACS resource and then use the ACS SMS SDK or REST API from your backend to send the message. Keep the ACS credentials on the server side rather than exposing them in the client application. Microsoft documents Access Key and Azure RBAC authentication for ACS SMS operations.

    Regulatory requirements also depend on the destination country and sender type. For example, if you're sending application-to-person SMS to U.S. users through a 10-digit long code (10DLC), Microsoft requires brand and campaign registration. An existing voice number that needs SMS enabled must first go through the applicable 10DLC registration and association process.

    If this OTP is specifically for user authentication/MFA, consider Microsoft Entra External ID rather than building the entire verification system yourself. External ID supports SMS one-time passcodes as an MFA method for customer applications, including native authentication scenarios.

    So the choice is essentially:

    • ACS SMS - appropriate when you want complete control over a custom OTP workflow and your application handles OTP generation/validation.
    • Microsoft Entra External ID - preferable when the requirement is authentication/MFA, and you want Microsoft identity services to handle the authentication workflow.

    If you can confirm which country the recipient mobile numbers are in and whether this OTP is for authentication/MFA or just transaction verification, we can recommend the appropriate ACS number type/registration and implementation.

    References:

    SMS overview - Azure Communication Services

    10DLC brand and campaign registration - Azure Communication Services

    Azure Communication Services authentication

    Authentication options - Microsoft Entra External ID

    =============================================================================

    Help make this community better for everyone: If the answer helped or resolved your issue, please accept it or upvote it. This helps others in the community find similar solutions.

    Was this answer helpful?

    0 comments No comments

Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.