Define Okta API endpoint and API token

$oktaApiUrl = “https://your-okta-domain.okta.com/api/v1/apps/app-id/user”

Define the user’s Okta ID and the app-specific attributes

$userId = “user-id”
$appAttributes = @{
attributeName = “attributeValue”
}
$appAttributesJson = $appAttributes | ConvertTo-Json

Send a PUT request to update the app-specific attributes for the user

Invoke-RestMethod -Uri “$oktaApiUrl/$userId” -Headers @{ “Authorization” = “SSWS $apiKey” } -Method Put -Body $appAttributesJson -ContentType “application/json”