cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
NickKays
New Member

Beta/test environments refreshes and cloning Microsoft Teams Sync and LTI settings from Prod

Hi All.

After some more testing it appears as though the Microsoft Teams Sync integration along with some LTI settings get copied over from Canvas production to the test and beta environments with each weekly/monthly refresh. This means that its possible that when testing in test/beta you may change something that impacts production.

I was wondering if any other canvas customers have run into this issue and if you had any process in place to manage the test/beta environments? We have been considering doing a clean up every Monday morning which would include turning off the Microsoft Teams Sync and turning off any concerning LTIs but its a fairly manual and time consuming process so I'd love to hear if anyone else has a better way of handling this scenario. 
 
Thanks heaps for your help.
 
Cheers
Nick  
Labels (1)
3 Replies
jerry_nguyen
Community Contributor

@NickKays 

You can use API (API allows you to get/create/edit data of an application - e.g. Canvas without interacting with the web UI) then write a script to automate a process or plug it into a workflow automation tool like Zapier or n8n

There is an API endpoint for most of the actions on Canvas, most of them are documented here: https://canvas.instructure.com/doc/api/

If an action is not documented (E.g. in your case, turning off Microsoft Teams Sync), you can try to find an API by using your web browser Developer Tools (E.g. F12 for Google Chrome)

Canvas_FindAPI.jpg

Example: You can send a PUT request to yourinsitution.instructure.com/api/v1/accounts/1 with the following JSON request to turn off Microsoft Teams Sync

 

{"account":{"settings":{"microsoft_sync_enabled":false,"microsoft_sync_tenant":"test.microsoft.com","microsoft_sync_login_attribute":"email","microsoft_sync_login_attribute_suffix":"","microsoft_sync_remote_attribute":"userPrincipalName"}}}

 

 

Thanks heaps for sharing. 

Out of interest, do you have something scripted that goes through and hits this API regularlly to ensure the Microsoft Teams Sync is switched off in your test and beta environments?

0 Kudos
jerry_nguyen
Community Contributor

@NickKays 

We don't use that integration. However, this is easily achievable by using a workflow automation tools as I mentioned earlier. 

- Zapier (Paid): https://zapier.com/help/create/code-webhooks/send-webhooks-in-zaps

- N8N (Free self-hosted): https://docs.n8n.io/integrations/builtin/core-nodes/n8n-nodes-base.httprequest/#node-reference

They both have graphical user interfaces (GUI) so you don't need to write any codes. You can simply create an access token for your account on Canvas and then enter those details into those tools. 

If you can host N8N or have access to paid Zapier, I can assist you with setting it up.

0 Kudos