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 (https://canvas.instructure.com/doc/api/logins.html#method.pseudonyms.update) 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: