Skip to main content
Question

Enable Form Login on user using API

  • October 10, 2025
  • 7 replies
  • 45 views

Forum|alt.badge.img+1

Hi ALL,

We have requirement to enable form Login for 2000 users in Password Safe. From BT portal, there is no bulk update option available .

I am looking for any API if available then we can use it for bulk update and enable form login. I know alternately we can reach to BT support team and get it done from Backend. However we want to explore first if any API is available to achieve this.

Can anyone please let me know if any REST API available that I can use and update the user profile .

Awaiting for response. thanks in Advance. 

 

7 replies

tclowater
BeyondTrust Employee
  • BeyondTrust Employee
  • October 10, 2025

Hi ​@immi563,

 

Sadly no, not at this time. Support would be your best option for a one-off go. 


frank.colvin
Forum|alt.badge.img+1
  • Veteran
  • October 10, 2025

here is a sample script. keep in mind that scripts should be thoroughly tested before using

# Authenticate to BeyondInsight API
$headers = @{
"Authorization" = "PS-Auth key=your_api_key"
"Content-Type" = "application/json"
}

# Get all users
$users = Invoke-RestMethod -Uri "https://your-beyondinsight-server/api/Users" -Headers $headers

# Assign users to MFA-enabled group
foreach ($user in $users) {
$body = @{ UserID = $user.UserID } | ConvertTo-Json
Invoke-RestMethod -Uri "https://your-beyondinsight-server/api/UserGroups/{groupId}/Users" -Method POST -Body $body -Headers $headers
}

tclowater
BeyondTrust Employee
  • BeyondTrust Employee
  • October 10, 2025

here is a sample script. keep in mind that scripts should be thoroughly tested before using

# Authenticate to BeyondInsight API
$headers = @{
"Authorization" = "PS-Auth key=your_api_key"
"Content-Type" = "application/json"
}

# Get all users
$users = Invoke-RestMethod -Uri "https://your-beyondinsight-server/api/Users" -Headers $headers

# Assign users to MFA-enabled group
foreach ($user in $users) {
$body = @{ UserID = $user.UserID } | ConvertTo-Json
Invoke-RestMethod -Uri "https://your-beyondinsight-server/api/UserGroups/{groupId}/Users" -Method POST -Body $body -Headers $headers
}

Fantastic workaround! I was thinking of the API for the user specific! 


frank.colvin
Forum|alt.badge.img+1
  • Veteran
  • October 10, 2025

single user or group? if its a group you can adapt the script to read from txt file

 


tclowater
BeyondTrust Employee
  • BeyondTrust Employee
  • October 10, 2025

single user or group? if its a group you can adapt the script to read from txt file

 

Oh, I was looking for API-specific approach on the user action to change their enabled/disabled forms login. I wasn’t thinking of the groups approach.


Forum|alt.badge.img+1
  • Author
  • Trailblazer
  • October 13, 2025

here is a sample script. keep in mind that scripts should be thoroughly tested before using

# Authenticate to BeyondInsight API
$headers = @{
"Authorization" = "PS-Auth key=your_api_key"
"Content-Type" = "application/json"
}

# Get all users
$users = Invoke-RestMethod -Uri "https://your-beyondinsight-server/api/Users" -Headers $headers

# Assign users to MFA-enabled group
foreach ($user in $users) {
$body = @{ UserID = $user.UserID } | ConvertTo-Json
Invoke-RestMethod -Uri "https://your-beyondinsight-server/api/UserGroups/{groupId}/Users" -Method POST -Body $body -Headers $headers
}

Hi frank

thank you so much for help. Can you please let me know what’s the MFA enabled group? Is it Azure MFA enabled group that we are referring to or it is something else? 

This solution could be helpful for me however I need some clarity on what’s the MFA group that we are referring to ?

Regards,

Imran ALiyani


Forum|alt.badge.img+1
  • Author
  • Trailblazer
  • October 13, 2025

On our environment , MFA is managed by Azure group which is hosted on AD. Hence we wont be able to add user to those group using BT APIs. If I am missing something , please help me understand.