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"
portal = portalpy.Portal(portalUrl, portalAdminUser, portalAdminPassword)
Yes, AdminUser has administrative rights in Portal. I'm not able to get to portalpy functions such as get_org_users because I don't get past the line in the script where it tries to connect to the portal - portal = portalpy.Portal(portalUrl, portalAdminUser, portalAdminPassword). That is the line where it errors out.
Error is HTTP 403: Forbidden.
When I try to go to the normal portal page it is configured to prompt for our CAC credentials and does not let me enter a username/password combination. My AD account also has administrative rights, but with our CAC credentials we no longer have a password, so I can't use that in my script. I somehow got to a login screen and was able to log in with AdminUser, so I have tested the password and know I can log in with it.