COM API - Windows Authentication

I've been using Win Auth via the COM API for a number of years. It saves me having to store user+pass in services and integrations as I can pass in a blank username + password and it will connect using current win user. However, I've recently found that the AccpacSession.OpenWin is failing on Sage 300 2020+ machine. I'm getting an error saying "You must supply the correct User ID and Password".

The user in Sage300 has been setup correctly to use Win Auth and I can sign into Sage300 app using Win Auth.

As a sanity check, I ran the following code across Sage300 2019 -> 2022. 2019 is the last version where this works for me.

Private Sub WinAuthOpen_ShouldConnect()
    On Error GoTo WinAuthEx
    Dim mysession As New AccpacCOMAPI.AccpacSession
        
    mysession.Init "", "XY", "XY1000", "69A"
    mysession.OpenWin "", "", "", "SAMINC", Now, 0, ""
    
    Debug.Assert mysession.IsOpened
    
    Exit Sub
WinAuthEx:
    Debug.Print Err.Description
    Debug.Assert False
End Sub

Is it just my environments or has there been a breaking change to AccpacSession.OpenWin?

Parents Reply Children
No Data