Showing results for 
Show  only  | Search instead for 
Did you mean: 
Community Member

Disabling users by setting login workflow_state to suspended?

Dear community, I am new to Canvas and its API. 

As many others here, I would like to be able to disable and enable my users temporarily. AFAIK there is no direct API call for this so my idea is the following:

- Search user by its SIS ID (which is identical to the email address in my case)

- Get the list of logins for the user (I only give one login for my users)

- Call the edit login API ( and set "workflow_state":  "suspended". If I understand well, this would disable user login.

Would this work? Does this method have any disadvantages over the others? 

P.S.: It would look stg like this using the Canvasapi Python package:

from canvasapi import Canvas

API_URL = "https://<canvas-url>"
API_KEY = "<insert-api-key-here>"

canvas = Canvas(API_URLAPI_KEY)
sis_id = ""
user = canvas.get_user(sis_id"sis_user_id")
logins = user.get_user_logins()
for login in logins:




Labels (1)
0 Kudos
0 Replies