
LoïcY.89029 (Dailymotion) asked a question.
Hello
I need to update Salesforce role/profile for 150 users in Okta
I'm already able to connect to the API (using the OktaAPI module for PowerShell), retrieving the Salesforce app data and users data
But I can't figure out how to update those two Salesforce specific fields (role and profile)
Which POST syntax must be used, please ?
Best

Hello @LoïcY.89029 (Dailymotion) Thank you for reacting out to our Community!
You might want to try this API call :
POST /api/v1/apps/${applicationId}/users/${userId}
As per our doc below:
https://developer.okta.com/docs/reference/api/apps/#update-application-profile-for-assigned-user
The Okta Community Catalysts Program is now live. Collect online badges when you participate in the Okta Help Center Questions community. Learn more here.
The October issue of the Okta Community is here and packed with tips on certification, how to earn badges, and new releases. Let us help you stay connected.
Hello @Paul S. (Okta, Inc.)
Indeed, I used this API call but I was searching for the correct JSON syntax in PowerShell
I finally found it out:
$body = @{
"profile" = @{
"role" = "$NewRole;
"profile" = $NewProfile
}
}
$jsonBody = $body | ConvertTo-Json -compress -depth 100
Thank you