none
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 

    https://abcdfed.com:9031/as/authorization.oauth2?client_id=ABC&response_type=code

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

    http://image.com/library-ui/?code=aZZUi2L2lsUDAyZba62AhxJRLbUHWiYlSqV8a_EJ

    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", "https://abcdfed.com:9031/as/authorization.oauth2?client_id=ABC&response_type=code", False
        oHttp.send

        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.

    Regards,

    Celeste


    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 MSDNFSF@microsoft.com.

    Friday, April 14, 2017 2:12 AM
    Moderator