Enroll User ​
PUT /userapi/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 two key fields to enroll them:
- UserID
- Enrollment Value
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.
In order to make this call from the Windows Integrated API, you must be given either the 'User Account Management' or 'Verification Policies' Security Administrator roles, for the Portal area within the Administration tab of Passwordstate.
Powershell
# PowerShell Request
#JSON data for the object
$Body = @{
UserID = "domain\userid"
SecurIDUserID = "userid"
}
$jsonData = $Body | ConvertTo-Json
$PasswordstateURL = 'https://passwordstate/userapi'
$result = Invoke-Restmethod -Method Put -Uri $PasswordstateURL'/portalenroll' -ContentType "application/json" -Body $jsonData -Header @{ "UserID" = "<UserID>" ; "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 |
Json
# Response
HTTP/1.1 200
[
{
"UserID":"domain\\userid",
"AuthAnvilUsername":"",
"DuoUserName":"",
"RADIUSUserName":"",
"PINNumber":"",
"SafeNetUserName":"",
"SecurIDUserID":"userid",
"TempPinCodeEmailAddress":""
}
]