How to setup OneLogin to sign in users on sites that use multiple login pages - onelogin

How do you setup OneLogin to sign in users on sites using multiple login pages.
A website has changed and now prompts for a username on one page and then the password on another page. The current authentication creds are only setup to use the one original sign-in web page.

Related

Optional sign in + SSO with azure ad b2c

I have an application which has multiple frontend SPAs (mostly React). They allow the user to sign in if they want to access privileged features, but an unauthenticated user is still able to access the site. Each SPA will access some backend apis using a token if they are authenticated. All of these sites should function transparently when it comes to login, so if you login on one site, it should be automatically propagated to all the sites (SSO)
When a site first loads we want to get the token for the user if they are logged in with SSO. If we use the redirect flow and the user isn't signed in we will end up on the sign in page, which isn't what we want as we allow anonymous access. We only want to show the login page if the user explicitly clicks the login link on a site.
Is there a way to check if the user is logged into sso without redirecting to the login page?
We have looked at ssoSilent (from msal) which functionally does what we want however its only supported via third party cookies which don't work in some browsers.
I have thought perhaps we could redirect to a silent login page which if the user isn't logged in will just redirect back with an anonymous flag in the queryString, but I don't know if theres a way to do this with azure b2c.
The only method is ssoSilent(), or your own implementation of it via iframe. It should work as long as your app is on the same root domain as the AAD B2C login page, which you can do with the Custom Domain feature.
There is no API endpoint available to do what you want.

Azure B2C - OIDC redirects to Reset Password Flow instead of signing a user in

We have an application that utilizes AzureB2C. The application also has links to partner websites that signs in a user via OIDC. We have the following scenario:
User goes to the website and the website redirects to AzureB2C Sign in page.
The user chooses to Reset his password and goes through the reset password flow. After the user resets his password, he is automatically signed in to our application
The user then clicks a link that should allow him to SSO in via OIDC
Instead of being automatically signed in, the Azure B2C "Reset Password" page is displayed to the user.
As a workaround, the user has to logout and log back in again to be automatically SSO'd in to the partner site.
How do we fix this so that OIDC does not send the user to the Reset Password page?
There was a bug in the setup for the “recommended” password reset flow.
https://learn.microsoft.com/en-us/azure/active-directory-b2c/add-password-reset-policy?pivots=b2c-custom-policy#self-service-password-reset-recommended
In the ForgotPassword technical profile, set UseTechnicalProfileForSessionManagement to SM-Noop.

Reset Password user flow is not work in Azure B2C

I have tried to make Azure B2C authentication by using following link https://learn.microsoft.com/en-us/azure/active-directory-b2c/tutorial-create-user-flows and Sign In page is working fine but i am unable to redirect to reset password page when clicking "Forgot Password?" option from Sign In page.
A sign-up or sign-in user flow with local accounts includes a Forgot password? link on the first page of the experience. Clicking this link doesn't automatically trigger a password reset user flow.
Your application needs to handle this error code by running a specific user flow that resets the password. To see an example, take a look at a simple ASP.NET sample that demonstrates the linking of user flows.

Azure Active Directory and Federated Authentication

We're using Azure Active Directory with Federated Authentication. This is working without a problem - but we need the ability to have users sign in with credentials other than their logged in Windows credentials.
What happens right now is
User navigates to our web app and the Azure ADAL for JavaScript attempts to log in
The user is redirected to https://login.microsoftonline.com/common/oauth2/authorize?response_type=id_token&client_id=xxxx&redirect_uri=xxxx&client-request-id=xxxx&x-client-SKU=Js&x-client-Ver=1.0.2&nonce=xxxx
The user is presented with a username and password box.
Upon entering the username (even if it is someone else's username) (as soon as focus is lost from the username textbox), the page shows
It looks like this email is used with more than one account from
Microsoft. Which one do you want to use? Work or school account Work
or school account Assigned by your work or school
Upon clicking "Work or school account", the user is presented with
Redirecting We're taking you to your organization's sign-in page.
The page redirects to the url
https://ds1.mydomain.com/adfs/ls/auth/integrated/?username=me%40mydomain.com&wa=wsignin1.0&wtrealm=urn%3afederation%3aMicrosoftOnline&wctx=estsredirect%3d2%26estsrequest%xxxxx&popupui=1
The user is automatically logged in using their active Windows credentials (even if they entered a different username on the previous page).
If I navigate to the URL https://ds1.mydomain.com/adfs/ls/auth/integrated/?username=me%40mydomain.com&wa=wsignin1.0&wtrealm=urn%3afederation%3aMicrosoftOnline&wctx=estsredirect%3d2%26estsrequest%xxxxx&popupui=1 using a Windows session with a non-domain (local) account, I get a standard Integrated Authentication prompt
So - it seems like our ADFS server is using Integrated Windows Authentication on an IIS Website.
My question is - how can I allow the user to log in as a different domain user for the web app. Is there a special ADFS login URL I can use? And if so, how do I tell the Azure app to use that URL. Or is there a way to disable Integrated Authentication in some other way, on demand?
Thank you.
UPDATE:
I see that if I point the ADFS URL to the basic auth endpoint
https://ds1.mydomain.com/adfs/ls/auth/basic/?username=me%40mydomain.com&wa=wsignin1.0&wtrealm=urn%3afederation%3aMicrosoftOnline&wctx=estsredirect%3d2%26estsrequest%xxxxx&popupui=1
I am prompted for basic authentication (exactly what I want)...so how do I tell my Azure AD or Azure AD App what login URL to use? And how can I control it conditionally?
You would need to either remove AD FS from the Local Intranet zone on the relevant machines so they prompt, or better, look in to the User Agent based targeting in AD FS and configure those machines to send a User Agent that triggers Forms Based AuthN.
Have a look at https://technet.microsoft.com/en-us/library/dn727110.aspx for more info on this.
Answer is actually pretty simple (with some help from Fiddler):
Add &prompt=login to the query string generated by the ADAL JavaScript when redirecting to login.microsoftonline.com. This causes the MS portal to redirect to the ADFS Forms Auth URL instead of the one using integrated security.

Issue with Sign In As Different User in Claim Based SharePoint 2010 Site with ADFS 2.0

We have a SharePoint 2010 Web Site with Claim based Authentication configured with ADFS 2.0.
We have customized the SignOut option in Welcome.acx to point SignOut link to ADFS SignOut URL
i.e. https://myadfsserver/adfs/ls/?wa=wsignoutcleanup1.0 which takes care of signing out user from all relying parties. But, if for some reason complete sign out was not done, and user tries to browse the site he does not have access to in that case user is redirected to SharePoint's OOB AccessDenind.aspx page.
This page provides a link to user to sign in as different user, but for some reason clicking on this link does not take user to ADFS sign in page, instead it takes user back to same AccessDenied Page only. Can somebody tell me how do I get this sign in as different user functionality working ?
SharePoint creates a cookie that is stored on the local disk and you have to force it to use a session based cookie.
http://www.shailensukul.com/2010/05/adfs-2-sharepoint-2010-signout.html

Resources