One of the best things about Office 365 is integration into Azure Active Directory (AAD). Simply put, AAD is a cloud-based directory and identity management system. This means if you have one account, your Office 365 account can be used to authenticate to any number of different cloud-based services including SugarCRM. While AAD does have a paid subscription element, the parts we need for integrating to SugarCRM are free.
To get this working in SugarCRM, you’ll need to have the following items:
- An Office 365 Subscription with an administrator login.
- Two SugarCRM Accounts
- One must be a system administrator
- A text editor application. In this article, I’ll be using notepad.
- Optional (but helpful is to have access to two different computers when testing. If something goes wrong, you should be able to use the ‘Admin’ account to log back in and disable SSO for troubleshooting.
- The user’s Email Address in SugarCRM must match the username of their Office 365 Account.
- While SugarCRM supports authentication using either LDAP or SAML, Azure AD requires Sugar On-Demand.
Is Azure Enabled?
If it's not already enabled, you’ll need to activate your subscription to Azure Active Directory. If this is already done, feel free to skip the next five steps and advance to ‘Setting up Sugar in Azure.'
The easiest way to do this is from the Office 365 Admin Center.
- Log in at login.microsoftonline.com/
- On the right, scroll down until you find ‘Admin’ and click on ‘Azure AD’.
- Your browser will open a new tab and you’ll be prompted to ‘Purchase’. Don’t worry, it's free. You’ll be getting the ‘Free’ service detailed here:
- After you click the ‘Purchase’ button, your Azure AD subscription will be created. This takes a few minutes. The page will refresh once it's completed.
- Once completed, click ‘Start managing my service’ to get started.
Setting up SugarCRM in Azure
- In your Azure subscription, click on your directory.
- Click on ‘Applications’
- Click the ‘Add’ button. It's tricky to find; it’s at the very bottom of the page.
- Select ‘Add an application from the gallery’
- Search for ‘SugarCRM’. When it displays in the list, select it and then click the checkbox.
- Once the application is added, Azure will prompt you to begin set up. Click ‘Configure single sign-on’.
- Click the Next arrow.
- Enter your SugarCRM Sign-on URL. Click the Next arrow.
- Click the ‘Download certificate’ link. Then open your downloads directory and locate the certificate file.
- In a new browser window, log into SugarCRM as an administrator.
- Once logged into SugarCRM, navigate to the Admin page and click on Password Management.
- Hidden at the bottom of the page is ‘SAML Authentication’. Click the checkbox.
- On the browser with the ‘Configure Single Sign-On’ window, copy the ‘Remote Login URL’ and paste it into BOTH the Login URL and SLO URL.
- Restore your downloads folder, right-click on the certificate file and open it with notepad.
- Copy the contents of the notepad file into the X509 Certificate field.
- Click ‘Save’.
- Check the box next to ‘Confirm that you have configured …’ and click the Next arrow.
- Click the Finish button.
- Click on Assign accounts.
- Select all users that will be using Single Sign-On (You can use Control + Click to select more than one). Once you’ve got all the users selected, click ‘Assign’.
Logging into SugarCRM with SSO
Now that Azure and SugarCRM are both configured, its time to test.
- From another user’s computer, open a browser and navigate to your Sugar instance.
- You’ll notice that the browser has blocked a pop-up window.
- Click the box and select the option that will always allow the pop-ups.
- Refresh the page.
- Once the page refreshes, you’ll get a pop-up asking for the user’s Office 365 Login. Provide the credentials and click Sign In. Optionally, you can click ‘Keep me signed in’. This has the benefit of simply logging you into SugarCRM whenever you browse to the page.
- Once you’ve signed in, it will take between 5 - 10 seconds before SugarCRM to complete the login process.
We hope you've enjoyed this tutorial on Enhancing Security with Sugar with Single Sign-On and Azure Active Directory. If you have any questions, reach out to our team here, and we'll be happy to answer!