Showing results for 
Search instead for 
Did you mean: 

Create Canvas User api but set user login auth as saml

How do you create a new canvas user account with their authentication user id set to saml.

Im assuming creating a user account is simialr to the sis import of user headings within the csv file.





0 Kudos
1 Reply

$token = "scrammble toke code"
$headers = @{"Authorization"="Bearer "+$token}
$domain =""

$body=@{'user[name]'='Star Lord'
'user[short_name]'='Star Lord'
'user[time_zone]' = 'Adelaide'
'communication_channel[address]' = ''
'pseudonym[unique_id]' = ''
'pseudonym[password]' = ''
'pseudonym[sis_user_id]' = '99999e'
'pseudonym[send_confirmation]' = 'false'
'psuedonym[authentication_provider_id]' = 'saml'}

Invoke-WebRequest -Method Post -Body $body -Headers $headers -Uri "https://$domain/api/v1/accounts/1/users"

The above PowerShell script works with creating a user account, however, it seems to create the account
as local to canvas and doesn't seem to be applying the authentication_provider_id = saml line.

I receive no on-screen errors when running this script.

Is there something that I have not applied or os the detail of information for the authentication_provider_id not correct.

0 Kudos
Top Kudoed Authors