Enroll User ​
PUT /api/portalenroll
A user account in Passwordstate only ever has one Verification Policy active for their account at a given time. To enroll a user automatically, saving them the effort of enrolling manually through the Password Reset Portal, you must specify three key fields to enroll them:
- UserID
- < Enrollment Value >
- APIKey
When specifying the field name for the appropriate Verification Policy, you do not have to specify all field names as documented below, but only the relevant one for the designated verification policy. If the Verification Policies have the option to email the user once enrollment is complete, this will also occur for these API calls.
Powershell
# PowerShell Request
#JSON data for the object
$Body = @{
UserID = "domain\userid"
SecurIDUserID = "userid"
}
$jsonData = $Body | ConvertTo-Json
$PasswordstateURL = 'https://passwordstate/api'
$result = Invoke-Restmethod -Method Put -Uri $PasswordstateURL'/portalenroll' -ContentType "application/json" -Body $jsonData -Header @{ "APIKey" = "<apikey>" }
Write-Output $result| Heading | Data Type | Description |
|---|---|---|
| UserID | String (100) | A combination of domain NetBIOS name, and the users sAMAccountName field in Active Directory |
| AuthAnvilUsername | String (100) | The user's AuthAnvil Username value |
| DuoUserName | String (100) | The user's Dou Username value |
| RADIUSUserName | String (100) | The user's RADIUS Username value |
| PINNumber | Integer | The Pin Number, based on the length requirements of the Verification Policy. If you specify this field, but leave the value blank, a randomly generated pin number will be assigned. |
| SafeNetUserName | String (100) | The user's SafeNet Username value |
| SecurIDUserID | String (100) | The user's SecurID UserID value |
| TempPinCodeEmailAddress | String (100) | Any email address of where a temporary pin code should be emailed to |
| APIKey | String (NA) | The System Wide API Key which can be found on the screen Administration -> Password Reset Portal Administration -> System Settings -> API tab |
Json
# Response
HTTP/1.1 200
[
{
"UserID":"domain\\userid",
"AuthAnvilUsername":"",
"DuoUserName":"",
"RADIUSUserName":"",
"PINNumber":"",
"SafeNetUserName":"",
"SecurIDUserID":"userid",
"TempPinCodeEmailAddress":"",
"APIKey":"Redacted"
}
]