Hello,
I've followed the directions here https://docs.itflow.org/aad_sso but am getting the following error when attempting to authenticate from the client portal:
Something went wrong with login. Ensure you are setup for SSO.
The error is given when I am redirected back to /portal/login.php from the Microsoft login stuff.
Sanity checking:
I've added two users to my Demo client with the following (hidden) emails:
User1: someone@somedomain.com, an admin user on my real customer's M365 tenant.
User2: me@mydomain.onmicrosoft.com, an admin user on my M365 tenant.
Most of my tests were with both users unlicensed. I did try licensing User2 but there was no change.
To test, I close all incognito windows and open a new one. I click the "Login with Microsoft Azure AD" button (or just go to https://itflow.mydomain.com/portal/login_microsoft.php). I am presented with the Microsoft login page. I authenticate as either User1 or User2. If I haven't already, I authorize the application. I am redirected back to https://itflow.mydomain.com/portal/login.php. I click the "Login with Microsoft Azure AD" button again, and am presented with the text:
Something went wrong with login. Ensure you are setup for SSO.
I've created a client secret. I've copied the Application (client) ID from App Registrations > MyAppSSO > Overview and added it to the MS Azure OAuth App (Client) ID field at Administration > Settings > Integrations.
I've copied the Value from App Registrations > MyAppSSO > Certificates & secrets > MyAppSSO_ClientSecret and added it to the MS Azure OAuth Secret field at Administration > Settings > Integrations.
I've selected only ID Tokens from App Registrations > MyAppSSO > Authentication. I've added the correct URL to the Web redirect URIs list. It didn't work at first because of an extraneous slash in my config.php $config_base_url. It seems to be correct now that I no longer get the error about a bad redirect URI.
Thank you for taking the time to read this post. Please let me know if there is any additional detail I can provide.