microsoft / o365-moodle

Office 365 and Azure Active Directory plugins for Moodle
GNU General Public License v3.0
180 stars 136 forks source link

Changing tenant #2145

Open kkiiskin opened 2 years ago

kkiiskin commented 2 years ago

Hi

if all useraccounts are moved to a new Azure AD tenant, but UPN:s and emailaddresses are kept the same, should we empty all data from auth_oidc_token and local_o365_objects tables? Or do we need to do even that?

The app registration is of course created to the new tenant and configured to Moodle before users log in.

weilai-irl commented 2 years ago

Hi @kkiiskin,

Sorry for not getting back to you sooner. It's the month before new academic year starts for a lot of our customers, so crazy busy times.

This is an interesting case that I didn't have to do it for any of the sites that we maintain so far. Since all resources (users, groups, calendars etc) will have different GUID in the new tenant, the principle would be any records in Moodle database that contain GUID or unique values linked to the resources in the old tenant would need to be cleared down. This includes:

Also after configuring the new app, you will need to reconfigure the integration (provide admin consent, verify setup etc) to ensure that a new application token is created.

Please post back how it goes in this process.

Regards, Lai

kkiiskin commented 1 year ago

Hi @weilai-irl

the change went well for us with emptying auth_oidc_token and local_o365_objects tables. Only authentication was used in this instance so that was enough.

kkiiskin commented 3 weeks ago

Hi @weilai-irl

this issue can be closed. Thank you!