Using SSO-Login in VBA RRS feed

  • Question

  • We have a Word document which connects to a SQL Database to draw a number (unique) from that Database.

    Works fine, number appears, connection is 100%

    We have implemented this Word document into a Web application.

    A user has to login to the Application to use it. However we have changed the Login Credentials to Single-Sign-On.

    The user thus logs into the WebApplication via SSO. Works 100%.

    Before SSO, the user had a username and password which he used to Login to the Application. He used the Word Document and the connection to the Database worked, a number was created, no connection problems.

    After we switched to SSO the connection to SQL doesnot work anymore and we recieve a ERROR 401 - Unauthorised Access.

    Here the Code wehre the Errorr appears:

      Set XMLHttp = CreateObject("MSXML2.ServerXMLHTTP")
      URL = GetHyperlinkbase()
      If URL = "" Then
        MsgBox Msg40, vbExclamation, Hdr4
        Exit Function
      End If
      URL = URL & "/svc.asmx/GetID"
      search = "Ort=AA"
      Call XMLHttp.Open("POST", URL, False, "", "")
      Call XMLHttp.setRequestHeader("Content-Type", "application/x-www-form-urlencoded")
      XMLHttp.send (search)
      If XMLHttp.Status <> 200 Or XMLHttp.responseXML.Text = "ERROR" Then
        MsgBox Msg10, vbExclamation, Hdr1
        Exit Function
      End If

    // Error Message appears at the "" XMLHttp.send (search) """

    Thank you for your Help

    Thursday, November 27, 2014 12:44 PM