I have written a script to create a csv list of users on my Portal. Trying to create some scripts to automate some tasks to move users from one portal to another. My script works fine on my test server and generates the list of users as a csv file. However, when I try to use this script on one of my production portals I am getting an error indicating that I am not authorized. This particular server/portal is setup to use CAC authentication and Active Directory accounts. CAC is our Common Access Cards and contains certificates that we use to authenticate to our network. So, my question is, how do I access my portal through Python/PortalPy when it is set to use AD accounts?
"""
portalUrl = "https://portal.url.."
portalAdminUser = "AdminUser"
portalAdminPassword = "AdminPassword"
defaultFilename='Map4_portal_users.csv'
portal = portalpy.Portal(portalUrl, portalAdminUser, portalAdminPassword)