Where do I find my Microsoft 365 credentials?
Credentials
- Application ID
- Tenant
- Tenant ID
These credentials are created by registering an application in Microsoft Azure (via Microsoft Entra ID, formerly Azure Active Directory).
Preparation
-
A user with the Global Administrator role in your Microsoft Entra tenant is required to grant admin consent and assign directory roles.
-
Access to Microsoft Entra admin Center.
Register an application
- Log in to your Azure Account through the Azure portal and navigate to the Entra ID Service.
- Click on Entra ID (formerly known as Azure Active Directory) > App registrations.
- Click on New Registration.
- Enter your App, e.g., "Holm Security Microsoft 365 Security" in the Name field.
- Under Supported account types to select: Accounts in this organizational directory only.
- Click on Register.
- You should now see the following values:
- Application (client) ID should be added to the Application ID field in the Microsoft 365 profile.
- Download the Holm Security certificate here.
- Navigate to your newly created application, and in the left panel, click Settings > Certificates >
Public key certificates (.cer) > Add certificate. - Upload Holm Security's certificate to the application.
Create the service principal
- In the search bar at the top of the screen, search for and select Subscriptions.
- In the new window, select the subscription you want to modify. If you don't see the subscription you're looking for, select the global subscriptions filter. Make sure the subscription you want is selected for the tenant.
- In the left pane, select Access control (IAM).
- Click Add, then select Add role assignment.
- In the Role tab, select the role you wish to assign to the application in the list, then select Next.
- On the Members tab, for Assign access to, select User, group, or service principal.
- Click Select members. To find your application, search for it by name.
- Click the Select button, then click Review + assign.
Assign API permissions
Required permissions
Permissions that have "write" privileges are included in the SharePoint permissions list. You can read about SharePoint permissions at the Microsoft website (external link). Those permissions are the minimum required to read the admin center configurations and are a limitation of the underlying APIs for these services. The write privileges are not used to carry out the assessment. You can find more information about these limitations at the Microsoft website (external link).
- Navigate to Entra ID > App registrations > All applications.
- Search for the application you want to add permissions to and select it.
- In the left panel, select API permissions > Add permissions.
- Add the Microsoft Graph permissions first:
- On the Microsoft APIs tab, select Microsoft Graph > Application permissions, then check
every Microsoft Graph permission from the Permissions table below and select Add permissions.
- Select Add a permission again, but this time open the APIs my organization uses tab.
- Search for Office 365 Exchange Online, select it, select Application permissions, check
Exchange.ManageAsApp, and select Add permissions. - Repeat for Office 365 SharePoint Online and the Sites.FullControl.All permission. Now add the Exchange and SharePoint permissions:
- On the Microsoft APIs tab, select Microsoft Graph > Application permissions, then check
- The table below lists the minimum permissions and roles required to read configuration data for each supported product:
| Permissions: | Resource: | Purpose: |
|---|---|---|
Directory.Read.All |
Microsoft Graph | Read users, groups, and applications in the tenant directory. |
Policy.Read.All |
Microsoft Graph | Read Conditional Access and authentication-method policies. |
PrivilegedAccess.Read.AzureADGroup |
Microsoft Graph | Read membership of privileged-access groups. |
PrivilegedEligibilitySchedule.Read.AzureADGroup |
Microsoft Graph | Read time-bound eligibility schedules for privileged roles. |
RoleManagement.Read.Directory |
Microsoft Graph | Read directory role definitions and role assignments. |
RoleManagementPolicy.Read.AzureADGroup |
Microsoft Graph | Read role-activation policies (for example, whether MFA is required to activate a role). |
User.Read.All |
Microsoft Graph | Read user account properties such as sign-in status and licensing. |
Exchange.ManageAsApp |
Office 365 Exchange Online | Authenticate to Exchange Online PowerShell as an application. See section below. |
Sites.FullControl.All |
SharePoint Online | Read SharePoint tenant-administration configuration. See section below. |
| Directory role: Global Reader | Tenant-wide | Grants read-only access to Exchange, Teams, and Defender configuration outside Graph. |
Important
You must select Application permissions (not Delegated). Certificate-based authentication signs in as the app itlself, with no user involved, so only Application permissions apply. Choosing delegated will cause scans to fail with authentication errors.
Assign the global reader role
API permissions cover Microsoft Graph and SharePoint, but Exchange Online, Microsoft Teams, and Defender
for Office 365 also require the application to hold an Entra directory role. Microsoft's own app-only.
The authentication guide for Exchange calls this out: Exchange.ManageAsApp only works in combination with a
supported directory role. Global Reader is the least privileged role that satisfies this requirement and is read-
only.
To assign the Global Reader role, do the following:
- Navigate to Entra ID > Roles & admins.
- Click the Global Reader role name > select Add assignments
-
Search for the application you created, select it, and click Add.
Grant consent for the added permissions
- In the left panel, scroll to Security > Permissions.
- Click the Grant admin consent for Contoso to enable it.
- Each permission in the list should now show a green check under Status.
Collect tenant and tenant ID
- In the Microsoft Entra Overview page, you can find the Microsoft Entra Tenant ID and the Primary domain (Tenant) name in the Basic information section.
- Tenant ID should be added to the Tenant ID field in the Microsoft 365 profile.
- Primary Domain should be added to the Tenant field in the Microsoft 365 profile.
- Done!