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 Azure 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 Azure 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", "All applications" tab should be selected by default
- Open: "SkyFormationApp4AzureConnector" 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 could close this guide
Manual Process Steps
1. Log into your Azure account (https://portal.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, 2 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 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 to really save all the permissions added above
Make sure you see a message that verifies the permissions were successfully granted
14. Navigate to Subscriptions in the Main Azure services menu by searching for "Subscriptions"
in the "All Services" page
15. Select a subscription you wish to monitor (you need to repeat the below process for each subscription you would like the SkyFormation Azure connector to monitor).
16. Click Access control (IAM) -> click Role assignments tab
NOTE: If the UI shows an error where it states the user does not have permission to set permissions, it could be caused by either:
a. The user is not an administrator of the Subscription
b. The subscription was generated by Office365. This is a bug with Office365. To overcome it create a new Subscription. Free or Pay-As-You-Go is sufficient.
17. For each of the following Roles:
() Log Analytics Reader
() Network Contributor
() Storage Account Contributor
Repeat the below steps:
a. Press the "+ Add" link
b. In the "Add permissions" page put the following values:
() "Role": Choose from the list role we are adding permissions to
(e.g. Log Analytics Reader)
() "Assign access to": Choose "Azure AD user, group, or application
() "Select": Put the name of the added Azure app name
After adding the Roles to the Azure app you should see a screen as below:
Make sure you see the new Role assigned to the Azure app in the IAM window.
NOTE: The application will only have the permissions granted to it in step 11.
You are done!
Now you are ready to add a SkyFormation Azure Connector to your SkyFormation Platform.
Please make sure you keep your:
- client ID of your new created Azure app
- Your tenant ID and generated secret ID