pingid-python-samples icon indicating copy to clipboard operation
pingid-python-samples copied to clipboard

Retrieving Windows logged on AD user to use with startAuthentication.py?

Open ThinkCode opened this issue 4 years ago • 0 comments

Thank you so much for the easy to read code. The following code in startAuthentication.py works flawlessly (phone PingID authentication). Could you please provide more information on how we can fetch the username without having the user to enter their username since this is a Windows AD environment and the user is logged in already.

import sys import pingid

PROPERTIES_FILE = './pingid.properties'

req_body = { 'spAlias': 'web', 'userName': 'username', }

pingid = pingid.PingIDDriver(PROPERTIES_FILE, verbose=True) response_body = pingid.call('rest/4/startauthentication/do', req_body)

Any Python code samples for the passwordless article from here https://apidocs.pingidentity.com/pingid-api/guide/pingid-api/pid_c_PingIDapiExamplePasswordless/ ?

ThinkCode avatar Jun 18 '21 16:06 ThinkCode