If you're having trouble at any stage please contact us at email@example.com.
The goal of this guide is to show you how to add an Azure AD application that could be used by the SkyFormation's Office 365 Cloud App Connector in your SkyFormation Platform.
You could use one of the following two processes to create the needed Azure AD application:
- Automated process (PowerShell based)
This option is based on a PowerShell script provided by SkyFormation that would automatically
create the needed Azure AD application in your Office Azure AD with its needed permissions.
- Manual process
The entire app creation process is based on manual steps done by the Azure AD administrator.
Automated Process Steps
1. Download the PowerShell script attached in this post.
2. Review the PowerShell content before executing and make sure the script procedure is
understood and accepted by your Office 365 admin.
3 Run the PowerShell script in a PowerShell shell.
4 Commit the permissions added to the new Azure AD app added
- Log into your Azure account (https://portal.azure.com).
- Open: "Azure Active Directory" service page
- Open: "App registrations" and press "View all application"
- Open: "SkyFormationApp4OfficeConnector" app page
- Press on the "View API Permissions" button
- Open: "API Permissions" page
- Bellow the list of automatically added permissions press "Grant admin concent for SkyFormation" button. and press "Yes" to approve.
If the entire permissions added and granted correctly you should see a message at the top says: "Successfully granted admin consent for the required permissions"
Azure AD app creation is DONE.
You can now skip to:
"(Optional) Getting the Exchange message trace and reports" section below.
Manual Process steps
1. Log into your Azure account (https://portal.azure.com).
NOTE: Ensure you use the O365 part of Azure (not the Azure top level) as they look the same
and have the same options, but O365 part should start with: aad.azure.com
2. Open Azure Active Directory
3. Navigate to Properties, keep aside the value of Directory ID, a.k.a Tenant ID
4. Navigate to App registrations, create a new app by clicking + New registration
5. Fill application details:
Supported account types: Choose "Accounts int this organizational directory only([Your organization ID])"
6. Click "Register"
7. From the page of the just created app keep aside the value of Application ID, a.k.a Client ID
8. Navigate to Certificates & secrets from the just created app page
9. Starting from release 2.4.108, two authentication methods are available:
Choose one of the above:
9a. For oauth2 create a Key (a.k.a Secret), insert a name for the key, and select Expiration of Never, click Add (only then will the key/secret be generated)
Continue to step 11.
9b. For certificate, you need to attach a certificate to the app.
First, create a certificate + private key.
If you already have a certificate and private key that you want to attach to skyformation app, continue to step 10b.
If you don't have the certificate + private key files, you can generate it as follows:
Generate an X.509 asymmetric key by typing the following command in your terminal:
openssl req -newkey rsa:2048 -nodes -keyout key.pem -x509 -days 3650 -out certificate.pem
2 files will be created in the directory where you ran the command:
- certificate.pem , which is the certificate or public key,
- key.pem, which is the private key.
Remember where these files are located as we will need them in the next steps.
10b. Click on "upload certificate": Browse for your certificate file and upload it to the app.
Continue to step 11.
11. Add permissions for the application by navigating to API Permissions link in the app page
12. In the API Permissions:
- Click Add a permission
- Click Select an API you need to add the app permissions to according to the below table.
(e.g. Microsoft Graph API)
- Check the needed permissions to the API according to the below table
(e.g. In the Application permissions check the "read all users full profiles" permission)
- Repeat this for each permission needed in the API page
- Click "Add permissions"
You should now see in the "Request API permissions" table the just added permissions to
the specific API you added permissions to.
Repeat the above step in section 12 for each API you need to add permissions to
according to the table below.
API Permissions needed table:
13. Click Grant admin concent in the bottom of the page to really save all the permissions added above
Make sure you see a message that verifies the permissions were successfully granted
(Optional) Getting the Exchange message trace and reports
In order to retrieve Exchange Reports data - Message Trace, DLP, Malware, Spam, SpoofMail, UrlTrace, a username & password of a user permitted to read those reports is required.
See this link for what permissions each report type requires -
In order to enable mailbox logging (MessageTrace), it needs to be enabled by the Office (Exchange) administrator for the users who's mailbox you want to monitor. See this guide on how to configure it - https://support.office.com/en-us/article/Enable-mailbox-auditing-in-Office-365-aaca8987-5b62-458b-9882-c28476a66918
Your are done !
Now you are ready to add a SkyFormation Office365 Connector to your SkyFormation Platform.
Please make sure you keep your:
- client ID of your new created Office365 app
- Your tenant ID and generated secret ID