none
SSPR: How to send OTP email by SMS gateway? RRS feed

  • Question

  • I'm seeking a way to send OTP email via SMS gateway so that I can have same OTP number from both email and SMS. This make sense to users who do not have OR can't use their mobile when they reset their password.

    In order to do that, I need to pass email parameter to SMS gateway, unfortunately the SendSMS class has only mobileNumber and message parameters, is there a way that I could pass  email address parameter to SMS gateway too?

    namespace OTPServices.FIM.SmsServiceProvider
    {
        using System;
        using System.Collections.Generic;
        using Microsoft.IdentityManagement.SmsServiceProvider;
     
        public class SmsServiceProvider : ISmsServiceProvider
        {
            public void SendSms(string mobileNumber, string message, Guid requestId, Dictionary<string, object> deliveryAttributes)
            {
                OTPServices.FIM.mySMSProvider.SendSms(mobileNumber, message);
            }
        }
    }


    Jason

    Monday, September 29, 2014 1:13 PM

Answers

  • I think that in case mobileNumber is unique for each user than you can just search on the portal to find user and his attributes, including email (sported way of doing this will be thru the powershell modules for FIM).

    Other way you can try is to put both mobile and email into the mobileNumber attribute (don't know if there are any constraints on the mobileNumber format).

    I didn't found any way to pass additionall attributes. But the question is what is coming in deliveryAttributes dictionary?


    Borys Majewski, Identity Management Solutions Architect (Blog: IDArchitect.NET)

    • Marked as answer by Jason2804 Thursday, October 2, 2014 9:54 AM
    Wednesday, October 1, 2014 9:07 PM

All replies

  • anyone from Microsoft ?

    Jason

    Wednesday, October 1, 2014 10:24 AM
  • I think that in case mobileNumber is unique for each user than you can just search on the portal to find user and his attributes, including email (sported way of doing this will be thru the powershell modules for FIM).

    Other way you can try is to put both mobile and email into the mobileNumber attribute (don't know if there are any constraints on the mobileNumber format).

    I didn't found any way to pass additionall attributes. But the question is what is coming in deliveryAttributes dictionary?


    Borys Majewski, Identity Management Solutions Architect (Blog: IDArchitect.NET)

    • Marked as answer by Jason2804 Thursday, October 2, 2014 9:54 AM
    Wednesday, October 1, 2014 9:07 PM
  • Thanks Majewski.

    Yes, I sync accountName value to msidmOneTimePasswordMobilePhone, search AD based on samAccountName for mobile/email value, return mobile to SendSMS class and send a email to SMTP gateway with email value.


    Jason

    Thursday, October 2, 2014 9:54 AM
  • Hi All,

    I am also working on similar thing.

    I have my sms gateway code API I used in console app using visual studio its working fine and we are getting sms.

    Same code I have placed in sendsms function of .dll code but it is not sending any sms.

    The url which we used must be changed? or How can I solve this. Please guide


    Remember Past Challenge Future"

    Friday, November 6, 2015 5:43 AM