You can use Autodiscover to create a mail profile in Outlook, see steps below:
Windows:
1. When you first open Outlook, if there are no mail accounts configured, you
will see the Add Account wizard.

Note:If you don’t see this automatically, you can open it manually by:
a. Go to Control Panel in Windows (Start > Control Panel).
b. Click on Mail. This will only appear if Outlook is installed.
c. Click on ‘Add’ to show the Add Account wizard.
2. Fill in your name, email address and password and press ‘Next’.
3. The wizard will attempt to use Autodiscover to configure your account automatically…

If you’re prompted for your username and password again at this point, be sure to tick the ‘Remember my Credentials’ tick box.
4. Allow the wizard a few moments to complete. You should see a screen like this:

5. Press Finish, and open Outlook to load your new profile.
OSX:
1. Open System Preferences > Internet Accounts.

2. Select Exchange as the account type that you want to add.

3. Enter your Office 365 login credentials and press Continue.
4. An Account Summary should appear.

Press Continue to confirm that these are correct.
5. Open Outlook for Mac to access your new mailbox.