SecHard
Adding an Azure resource to SecHard
You can follow this guide to add Azure subscriptions into SecHard for security hardening and auditing using the minimum necessary permissions.
Phase 1: Azure Portal Configuration (App Registration)
SecHard connects to Azure via a Service Principal.
Sign in to the Azure Portal and navigate to Microsoft Entra ID (formerly Azure AD).
Go to App registrations in the left-hand menu and click + New registration.
Name the Application: e.g.,
SecHard-Azure-Audit.Supported account types: Select "Accounts in this organizational directory only (Single tenant)".
Click Register.
Note the Credentials: On the Overview page, copy and save the following: Application (client) ID, Directory (tenant) ID
Create a Client Secret: Go to Certificates & secrets > Client secrets > + New client secret. Add a description and set an expiration.
Copy the Value of the secret immediately. You will not be able to see it again.
Phase 2: Assigning Least Privilege Roles
To comply with security best practices, we will assign only Read-Only roles to the application. This allows SecHard to audit settings without having permission to change or delete your resources.
Search for Subscriptions in the top search bar and select the subscription you want to add.
Click on Access control (IAM) in the left sidebar.
Click + Add > Add role assignment.
Assign the following two roles (repeat the process for each): Reader: Allows SecHard to see the configuration of all resources. Security Reader: Allows SecHard to read security policies and security states (essential for hardening audits).
On the Members tab, click + Select members and search for the name of the application you created in Phase 1 (e.g.,
SecHard-Azure-Audit).Click Review + assign.
Phase 3: SecHard Portal Integration
Now that the Azure side is ready, add the resource to your SecHard instance.
Log in to the SecHard Web Interface.
Navigate to Resource > Add Resource.
Select Cloud > Microsoft > Microsoft Azure from the Resource Type list.
Fill in the relevant information for your resource.
While adding the account, pick Microsoft Online, and fill in the following fields using the information saved in Phase 1:
Account Name: A display name (e.g., Sechard Azure User).
Tenant ID: From Phase 1, Step 6.
Client ID: From Phase 1, Step 6.
Organization: Your Tenant Domain (e.g.,
contoso.onmicrosoft.com).Client Secret: The secret value from Phase 1, Step 7.
Click Save.
SecHard