Authorizing User Consent to Third-party Apps in Office 365
Office 365 has a global setting in the Microsoft Admin center to enable or disable third-party apps on a per-tenant basis.
See: https://learn.microsoft.com/en-us/microsoft-365/admin/misc/user-consent?view=o365-worldwide#turning-user-consent-on-or-off
The link to this page has changed since the Microsoft help article was written. The updated steps are as follows:
Here's how to turn User consent to apps on or off.
In the Microsoft 365 admin center, go to the Settings > Org settings > Services page, and then select User consent to apps.

On the User consent to apps page, select the option to turn user consent on or off.

See: https://learn.microsoft.com/en-us/microsoft-365/admin/misc/user-consent?view=o365-worldwide#turning-user-consent-on-or-off
The link to this page has changed since the Microsoft help article was written. The updated steps are as follows:
Turning user consent on or off
Here's how to turn User consent to apps on or off.
In the Microsoft 365 admin center, go to the Settings > Org settings > Services page, and then select User consent to apps.

On the User consent to apps page, select the option to turn user consent on or off.

Updated on: 26/03/2024
Thank you!