ADFS - Get user information - adfs

I need to authenticate myself with an AddIn (excel, word, powerpoint) in office 365.
The customer has a local ADFS that he would like to use to authenticate the user.
I would therefore like to authenticate myself on local ADFS, retrieve the token and user information and then use the AddIn and Azure Rights managment (RMS).
Authentication to ADFS must be done automatically, without entering login and password.

The usual way of doing this is to setup ADFS as a federated domain to Azure AD. Office 365 runs on Azure AD.
ADFS supports Windows Integrated Auth so a user logged into the domain joined PC will seamlessly log into ADFS.

Related

Single sign-on using ADFS approach

One of my customers wanted to implement SSO using ADFS. I was thinking to do a POC for the same using ADFS in Azure. But one requirement is only some users have ADFS login and other user needs to use custom authentication using the identity provider.
Is it possible to use custom and ADFS authentication in the same web application? Like presenting a page with sign-in using SSO or sign-in with credentials?
My client just shared the federatedmetadata.xml. (Do we need to give the full URL DNS name + metadata URL when you create the new project?).
Is it possible to use custom and ADFS authentication in the same web application? Like presenting a page with sign-in using SSO or sign-in with credentials?
If you're open to it, you could integrate your application with an identity provider, and that provider does this for you.
For example:
Your application integrates with CAS as the IDP, and CAS presents this screen to the end user for the authn attempt. User can choose either option, and then once completed, they will be redirected back to your application to continue, and your application interacts with CAS to validate the user account/session. CAS itself is connected to your own account store, and is also integrated with ADFS.
What do you mean by "ADFS in Azure". The only way to do this is to run ADFS as a VM in Azure. Otherwise, you would use Azure AD.
Yes, you can federate ADFS with other identity providers so they both are accessible from the same login screen.
What other identity providers are you looking at?
ADFS is not a project, it's a server add-on and it's all done via configuration on the Windows server.
In terms of importing metadata, see this.

ADFS, SharePoint On-prem

We have a SharePoint 2016 farm with 8 servers. Also, the load balancer server is functioning to balance the request between the web-front-end server(s). The web application is configured to use the ADFS as an additional authentication provider while the default is "Windows Authentication NTLM" also using at the same time in the default zone. As the web application has two authentication providers - ADFS and Windows - every time the user has to select the authentication method. If "Windows auth" is selected the user will enter his or her internal Active Directory account manually to login into and if the user selects ADFS, request go to ADFS and redirecte to Azure login as the relying party and a claim is configured. The ADFS thing is ok for me as it is working as expected.
But I want to resolve the intranet users in intranet network itself (Pass-Through Authentication). As we know ADFS has the capability to authenticate intranet users in company networks by setting up the ADFS property by Set-AdfsProperties -IntranetUseLocalClaimsProvider $true to have all intranet users use AD and not be redirected to Azure AD but somehow it's not affecting anything. The cmd is runing successfully but not working.
Is there any additional configuration related to ADFS or SharePoint which needs to be done to archive pass-through authentication or autologin for intranet users who have logged into the machine using AD accounts?
enter image description here

How to mix Azure AD authentication and Windows authentication in MVC 4 app?

I have a design requirement for an ASP.NET MVC 4 (.NET 4.6.1) app hosted on the company server (Not Azure) to do the following:
Check is user is authenticated via Windows Authentication
a)Yes - designate user as "authenticated"
b)No - use OpenIdConnect (OWIN) to authentication using Azure Active Directory.
Once authenticated use the standard [Authorize] attributes on controller methods etc. I have implemented Windows and Azure AD authentication alone is individual MVC apps but never together.
I have found several sources describing how to mix Windows and Forms authentication, but none for this combination.
Does anyone have insights on how this might be achieved?
I had a similar requirement a year ago and my approach was :
The users are redirected to input their AD credentials (https://azure.microsoft.com/en-us/documentation/articles/app-service-mobile-how-to-configure-active-directory-authentication/)
Once they are sucessfully logged in on the AD you will get a token.
Then I call the Azure AD API on their behalf using the token I just got. I woulds just call the /me endpoint that will return me the user personal details.
With the above response I just need to check if the email address matches the email address that was initially requested.
If it matches it means the user was successfully validated against the AD.
Then you can proceed and issue that user a token or cookie to access your application.

ADFS 2.0 for the users to access through intranet and inetrnet

I am developing an ASP.NET Web application which should be accessible to the users who can access from both intranet and internet. Could you suggest the approach to implement this with ADFS 2.0.
The requirement is when users are logged in in the intranet the authentication to the app should be seamless without giving user id and password. Whereas for the same users if they are accessing out side intranet it should take email id and password as creditentials and authenticate.
You can put an ADFS proxy in front of ADFS for external users which by default uses Forms.
Internal users will get Windows Auth.
ADFS out-the-box only allows authentication with user name.
You would have to do some custom development - refer Adjusting the Home Realm Discovery page in ADFS to support Email Addresses.

Single sign on between ASP.NET app and Office365 with on-premise ADFS STS

I'm building an ASP.NET web app that authenticates users with Windows Identity Foundation.
The organization has an on-premise ADFS STS. Their Office365 authenticates through Microsoft Federation Gateway with the on-premise STS. The new web app will also authenticate against the on-premise STS with WIF.
Can I establish silent single sign on between the new app and the Office365 environment? So the user will not have to log into Office365 once he is logged into the web app and vice versa.
Yes, you should be able to accomplish this by federating your ASP.NET application with Office365 directly. As you probably already know, typically the way this works is you have Office365 synced to on prem AD, and you have a trust set up with the on-prem ADFS server. When you're signing in to your web application the user gets redirected to Office365 to type in their UPN (typically the email address). Office365 uses that to figure out which on-prem ADFS server to redirect you to.
If you're logging on from within the domain, you get authenticated right away via windows integrated auth. ADFS will redirect you back to Office365 to establish a session, and Office365 will log you in to the application itself. If you're outside of the domain, you'll need an ADFS external proxy set up. There, instead of windows integrated auth, this special ADFS proxy will prompt the user for corporate credentials, and then redirect back to Office365 in the same way as before.
Here's a nice whitepaper that explains all of this in more detail:
http://www.microsoft.com/download/en/details.aspx?id=28971

Resources