Support Forum
The Forums are a place to find answers on a range of Fortinet products from peers and product experts.
Marzigliano
New Contributor

SSO and LDAP Configuration for Office365-only organization

We're configuring our first/new FortiGate device and need to connect in users on the LDAP/RADIUS and SSO pages. There is no local server, AD, or domain controller presence in the organization, as they exclusively use Office 365, so we are trying to configure the FortiGate to connect to Office 365 or Azure for the LDAP/RADIUS and SSO configuration. We've been scouring the documentation/help at Fortinet and at Microsoft but to no avail.  We will face a similar challenge next week with an org that has only G-Suite users and no local servers either.

2 Solutions
v20100
New Contributor III

We are assuming that Domain Services and LDAPS is properly configured in Azure

On FG, for ldap server, make sure you use port 636

Common Name Identifier: sAMAccountName

Use your DN

Bind type: Regular

Username: use company\username syntax.

If you use username or username@companydomainname it does not work

Secure Connection: selected

Protocol LDAPS

No certificate

 

Check that the connection is successful and if you are on version 6, test a user credential from there.

No point to carry on, if you connection is not successful

 

When you create your User group, use the previously created LDAP server.

If like me, you want to restrict access to a particular user group, on your Recursive list, select OU=AADDC Users, and search for your required group. Once found, you need to right click on it to select it.

 

The next step is the one which tricked me for a couple of days: 

When you try Forticlient, it fails to authenticate. Error message is not helping  and there is nothing in the logs of interest. Of course, there is nothing either on AzureAD

The change to make it work is as follow on the FG:

config system global

set ldapconntimeout 5000

end

 

Also, on the Forticlient, username is shortname of UPN. If user uses full UPN it will fail. You can see these attempts in the logs

 

Good luck

View solution in original post

dcook
New Contributor

I just went through figuring this out today with some trial and error.   Here is what worked for my setup.

 

I'm on  FortiOS v6.0.4 build0231 (GA)

This is for Azure AD with no local domain sync enabled.  Make sure domain services is set up and ldaps is configured with a proper certificate.   Also don't forget to set AADS NSG rules to allow ldaps on port 636 from your firewall IP. Edit the global settings for a longer ldap connection timeout to 5000 config system global set ldapconntimeout 5000 Set up a LDAP server Name    AzureAD Server IP/Name    your.ldap.name Server Port    636 Common Name Identifier    userPrincipalName Distinguished Name    ou=AADDC Users,dc=company,dc=com Bind Type    Regular Username   &nbsp bind@company.com   (The bind account needs to be in the AAD DC Administrators group) Password    userpassword Secure Connection checked to on Protocol ldaps Certificate    none Test Connectivty and then Test User Credentials. The username is their primary email address.   test@company.com  If you have Office 365 MFA enabled it will fail. I haven't found anyway to auth a user successfully with MFA enabled. Go to User Groups and do not create a new user group.  Select local and add a Remote Group.  Add the ldap server from above as the Remote Server. Select the ldap group the vpn user are in.  Make sure you right click on the grou and hit + Add Selected. In SSL-VPN Settings under Authentication/Portal Mapping add the local group to the Portal full-access if your users are going to have full tunnel access.

View solution in original post

13 REPLIES 13
afleming
New Contributor

I don't know about O365, but this link might be helpful for SSO for G-Suite users.  Make G-Suite a SAML IDP and the FortiGate a SAML SP?  

 

https://support.google.com/a/answer/6087519?hl=en

 

 

ttreat
New Contributor

I have been looking into doing this same thing. From researching online and also talking to specialists at Microsoft in their IDP/SSO department, I have not really found an easy way to do this. It seemed at first there was going to be some options for using Microsoft MFA server to act as a RADIUS server, but the more I looked into it we realized it would not work. If you look at this link ( https://docs.microsoft.com/en-us/azure/multi-factor-authentication/multi-factor-authentication-get-s... ) you will see that using MFA server for authenticating users for things like VPN and WiFi, one would need a local on-site MFA server - but to authenticate/authorize cloud Office365 users one would have to use the cloud MFA server...so kind of a catch-22. 

 

The only thing I think would work is to enable full cloud Azure ADFS and open a VPN tunnel to the cloud ADFS for the Fortinet to use for IDP/SSO, or to use a 3rd party group like jumpcloud. 

 

I hope to hear Microsoft gets this going in some way, but I'm sure they are trying to not go so fast as to abandon their on-site AD base which I'm sure still brings a lot of money. 

nicol_azevedo

Hi Marzigliano,

 

Did you manage to achieve  your goal? Because I need the exact same configuration butt can't find a way to do it.

 

Appreciate your help.

 

Regards,

 

 

morleyc

Me three, exact same requirement, please let me know if anyone has found a solution?

v20100
New Contributor III

I have been able to authenticate against AzureAD. You need to install the Domain Services and then setup LDAPS.

It works fine, but there was some tricks to configure the ldap server on the Fortigate. I can share the details if you are interested.

Note that I have not found a solution for using existing AzureAD MFA or a free or cheap MFA solution for Forticlient that works with LDAPS on AzureAD.

 

At this stage, I believe the only way is to put FortiAuthenticator in the mix, but it comes with extra cost.

 

I will test this in the next few days as a POC

hu_FTNT

v20100,

Can you share the details?

v20100
New Contributor III

We are assuming that Domain Services and LDAPS is properly configured in Azure

On FG, for ldap server, make sure you use port 636

Common Name Identifier: sAMAccountName

Use your DN

Bind type: Regular

Username: use company\username syntax.

If you use username or username@companydomainname it does not work

Secure Connection: selected

Protocol LDAPS

No certificate

 

Check that the connection is successful and if you are on version 6, test a user credential from there.

No point to carry on, if you connection is not successful

 

When you create your User group, use the previously created LDAP server.

If like me, you want to restrict access to a particular user group, on your Recursive list, select OU=AADDC Users, and search for your required group. Once found, you need to right click on it to select it.

 

The next step is the one which tricked me for a couple of days: 

When you try Forticlient, it fails to authenticate. Error message is not helping  and there is nothing in the logs of interest. Of course, there is nothing either on AzureAD

The change to make it work is as follow on the FG:

config system global

set ldapconntimeout 5000

end

 

Also, on the Forticlient, username is shortname of UPN. If user uses full UPN it will fail. You can see these attempts in the logs

 

Good luck

dcook
New Contributor

I just went through figuring this out today with some trial and error.   Here is what worked for my setup.

 

I'm on  FortiOS v6.0.4 build0231 (GA)

This is for Azure AD with no local domain sync enabled.  Make sure domain services is set up and ldaps is configured with a proper certificate.   Also don't forget to set AADS NSG rules to allow ldaps on port 636 from your firewall IP. Edit the global settings for a longer ldap connection timeout to 5000 config system global set ldapconntimeout 5000 Set up a LDAP server Name    AzureAD Server IP/Name    your.ldap.name Server Port    636 Common Name Identifier    userPrincipalName Distinguished Name    ou=AADDC Users,dc=company,dc=com Bind Type    Regular Username   &nbsp bind@company.com   (The bind account needs to be in the AAD DC Administrators group) Password    userpassword Secure Connection checked to on Protocol ldaps Certificate    none Test Connectivty and then Test User Credentials. The username is their primary email address.   test@company.com  If you have Office 365 MFA enabled it will fail. I haven't found anyway to auth a user successfully with MFA enabled. Go to User Groups and do not create a new user group.  Select local and add a Remote Group.  Add the ldap server from above as the Remote Server. Select the ldap group the vpn user are in.  Make sure you right click on the grou and hit + Add Selected. In SSL-VPN Settings under Authentication/Portal Mapping add the local group to the Portal full-access if your users are going to have full tunnel access.

v20100
New Contributor III

Hi dcook,

 

it is good to know there are several ways (ie using shortname or full upn)

I am surprised it does not work if your users have Office 365 MFA enabled.

In our case, we have Azure MFA for all , and it does not seem to affect their login via ldap or require MFA (in fact I would have loved if they had been prompted for their Azure MFA SSO!)

 

Ultimately, we want to use 2FA with Forticlient but it does not look like we can use MFA from Azure for this

Looks like the only solution is to use FortiAuthenticator, to authenticate against Azure Ldap, and then provide 2FA via Radius to the Fortigate.

I tested successfully with a local user on FortiAuthenticator, but am waiting for Fortinet to fix the bug to authenticate with Azure Ldap or Gsuite to carry on testing the full solution

 

Cheers

Labels
Top Kudoed Authors