1. Ashutosh Varshney
  2. PowerBuilder
  3. Thursday, 19 March 2020 20:09 PM UTC

Hello Everyone,

I have an application with uses AD authentication to grant access. It does not work when the user is connected thru VPN. It fails when I call objADSI.UserName - "Error accessing object property username". Any idea how to make it work for VPN as well? Here is my code:

OleObject objADSI, objADUser

Try
 objADSI = CREATE OleObject
 li_Rtn = objADSI.ConnectToNewObject ('ADSystemInfo')
 If li_Rtn = 0 Then
  ls_UserDN = String (objADSI.UserName)
 End If
Catch (oleRuntimeError l_Err)
 ls_Err = 'AD Error~r~n~r~nSource: ' + l_Err.Source + '~r~n' + l_Err.Text
End Try

Return

 

Ashutosh Varshney Accepted Answer Pending Moderation
  1. Thursday, 19 March 2020 21:10 PM UTC
  2. PowerBuilder
  3. # 1

Thanks Chris.

My machine is not on the domain. Can I still use advapi LogonUser?

 

Regards,

Comment
  1. Ashutosh Varshney
  2. Thursday, 19 March 2020 22:43 PM UTC
My VPN is linked to the office network. Once connected it lets me access office network resources.
  1. Helpful
  1. Chris Pollach @Appeon
  2. Thursday, 19 March 2020 23:53 PM UTC
The VPN must allow you to participate in a "Domain". Just basic network access is not enough.
  1. Helpful
  1. Ashutosh Varshney
  2. Friday, 20 March 2020 13:18 PM UTC
Thanks Chris.That was very helpful.
  1. Helpful
There are no comments made yet.
Chris Pollach @Appeon Accepted Answer Pending Moderation
  1. Thursday, 19 March 2020 20:25 PM UTC
  2. PowerBuilder
  3. # 2

Hi Ashutosh;

   That would fail if the VPN was masking the fact that your App was not on an MS-Windows DOMAIN based network.

Regards ... Chris

Comment
  1. mike S
  2. Thursday, 19 March 2020 21:26 PM UTC
Also, i believe that the DNS of your office would have to be set as part of the VPN connection. the vpn software should have that as an option
  1. Helpful
  1. Ashutosh Varshney
  2. Thursday, 19 March 2020 22:44 PM UTC
Thanks Mike. Which setting should I be looking at?
  1. Helpful
There are no comments made yet.
  • Page :
  • 1


There are no replies made for this question yet.
However, you are not allowed to reply to this question.
We use cookies which are necessary for the proper functioning of our websites. We also use cookies to analyze our traffic, improve your experience and provide social media features. If you continue to use this site, you consent to our use of cookies.