AnsweredAssumed Answered

Create new Login resource for users.

Question asked by Jack Carico on Oct 28, 2019
Latest reply on Oct 28, 2019 by Jack Carico

I am trying to create a new Login resource for users to tie into our existing SAML authentication. I have tried to create a new entry using the API posted here: Logins - Canvas LMS REST API Documentation  

I keep getting a 404 error. My account has admin rights for the tenant and other API calls have been working. (e.g. GET /api/v1/accounts/102890/logins worked to retrieve the Logins associated with the user's token)

 

Below is the POST request header and body with some of the details redacted.

POST /api/v1/accounts/102890/logins HTTP/1.1
Host: wwcc.test.instructure.com:443
Content-Type: multipart/form-data
Authorization: Bearer <token>
User-Agent: PostmanRuntime/7.19.0
Accept: */*
Cache-Control: no-cache
Postman-Token: 15163590-b4f9-4664-aa62-049258037e8c,3172a291-13a8-44dc-b016-af1c528efb1b
Host: wwcc.test.instructure.com:443
Accept-Encoding: gzip, deflate
Content-Length: 99
Cookie: log_session_id=xxxxxxx; canvas_session=xxxxxxxxx; _csrf_token=xxxxxxxx
Connection: keep-alive
cache-control: no-cache

user[id]:12345678
login[unique_id]:example@wwcc.edu
login[authentication_provider_id]:SAMLWWCC

Outcomes