[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Posting Requests To Microsoft Azure



   On Fri, Apr 1, 2016 at 4:04 AM, Paul Park <[1]parkp@xxxxxxxxxx> wrote:

     � �Hi Charles
     � �Thanks very much for this info. It's reassuring that I can get
     the
     � �authorisation token via a HTTP post. I don't know c#, so I'm
     guessing
     � �that the crucial bit of David's code is:
     � �var body = await HttpPost(tenantId, payload);
     � �return body.access_token;
     � �I can see no reference to tenantId in the code - is this the
     URL I post
     � �the request to? I know this isn't your code, just wondered
     whether the
     � �answer was more obvious to you...
     � �Thanks,
     � �Paul

   �ul,
   �  �   �nantID is passed in as the first parameter to the method.
   �public static async Task<string> AcquireTokenBySPN(string tenantId,
   string clientId, string clientSecret)�  Honestly, I'd say this line is what's important as it tells you how to
   format the post string.
   var payload = String.Format(SPNPayload,
   � � � � � � � � � � � � � �   WebUtility.UrlEncode(ARMResource),
   � � � � � � � � � � � � � �   WebUtility.UrlEncode(clientId),
   � � � � � � � � � � � � � �   WebUtility.UrlEncode(clientSecret));
   �arles�References

   1. mailto:parkp@xxxxxxxxxx
-----------------------------------------------------------------------
This is the FTPAPI mailing list.  To unsubscribe, please go to:
http://www.scottklement.com/mailman/listinfo/ftpapi
-----------------------------------------------------------------------