cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
Surveyor

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
Highlighted
Surveyor

$token = "scrammble toke code"
$headers = @{"Authorization"="Bearer "+$token}
$domain ="schooldomain.instructure.com:443"

$body=@{'user[name]'='Star Lord'
'user[short_name]'='Star Lord'
'user[time_zone]' = 'Adelaide'
'communication_channel[address]' = 'lords@cschooldomain.sa.edu.au'
'pseudonym[unique_id]' = 'lords@schooldomain.sa.edu.au'
'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
Labels