Match each Entra value to the server field
The client ID and client secret are different values. Copy them from these exact locations:
Application (client) IDApp registration → Overview → Essentials
MICROSOFT_CLIENT_IDClient secret ValueCertificates & secrets → Client secrets → Value
MICROSOFT_CLIENT_SECRETSecret IDDo not use this value anywhere in the app
NOT USEDPut the two correct values in /opt/m365-domain-manager/.env:
MICROSOFT_CLIENT_ID=your-application-client-id
MICROSOFT_CLIENT_SECRET=the-secret-value
MICROSOFT_REDIRECT_URI=https://trustedharbor.space/office365/api/microsoft/callback
For certificate authentication, use MICROSOFT_CERTIFICATE_PATH and MICROSOFT_CERTIFICATE_THUMBPRINT instead of the secret. Restart the web and worker services after changing the file.