Installation 

Install with Composer 

Install the extension via Composer:

composer req oliverkroener/ok-azure-login
Copied!

After installation, update the database schema to create the configuration table:

vendor/bin/typo3 database:updateschema
Copied!

See also Installing extensions, TYPO3 Getting started.

Include the static TypoScript 

  1. In the TYPO3 backend, go to the Template module
  2. Select the root page of your site
  3. Choose Info/Modify and click Edit the whole template record
  4. Switch to the Includes tab
  5. Add Azure Login from the list of available static templates

Add the content elements 

The extension provides two content elements, available under the Azure Login group in the New Content Element Wizard:

Azure Login
Renders a "Sign in with Microsoft" button. When a user authenticates via Microsoft Entra ID, the extension matches their email to an existing fe_users record and logs them in. If auto-creation is enabled and no matching account exists, a disabled account is created automatically (see Backend module (recommended)).
Azure Logout
Renders a "Sign out" button for logged-in users. Can optionally redirect to the Microsoft logout endpoint to sign the user out of Microsoft as well.

To add them:

  1. Go to the Page module and select the page where the login or logout button should appear
  2. Click Create new content element
  3. Select from the Azure Login group: either Azure Login or Azure Logout
  4. Configure the element settings (button theme, redirect URL, etc.)
  5. Save and clear caches

Backend login 

The extension automatically registers a backend login provider. Once configured (see Configuration), one or more "Sign in with Microsoft" buttons appear on the TYPO3 backend login screen at /typo3/.

Each site with a valid, enabled backend login configuration will show a separate button, identified by the configured login button label (e.g. company name). Configure backend login in the backend module at Web > Azure Login under the Backend section.

The backend callback URL is displayed as a read-only field in the backend configuration form with a copy-to-clipboard button for easy registration in the Azure portal.