OAUTH 2.0 VBA and get response code from another URL RRS feed

  • Question

  • We are using OAUTH 2.0 to check whether the user is authorized to get the authorization code 

    when user clicks this link

    It will validate the user NT logon and redirect to this URL if user is authorized to get the authorization code.

    can you please kindly advise how we can get response code in VBA ?

    We have tried the following methods but they don't work


        Dim oHttp As New WinHttp.WinHttpRequest

        oHttp.Option(WinHttpRequestOption_EnableRedirects) = False
        oHttp.Open "GET", "", False

        MsgBox oHttp.getResponseHeader("Location")

    Thursday, April 13, 2017 9:33 AM

All replies

  • Hello,

    Thanks for posting here, this forum is for issues about Excel Object Model. As your issue is not related to Excel object model, I would move this thread into VBA forum.



    MSDN Community Support
    Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact

    Friday, April 14, 2017 2:12 AM