Microsoft 365
Microsoft 365 is a comprehensive cloud-based productivity and collaboration platform that integrates email, calendar, file storage, contacts, and communication tools for organizations and individuals. This integration platform provides access to query and analyze data across Microsoft 365 services including Outlook email, calendars, OneDrive file storage, and contact management systems.
| Category | Collaboration |
| Direction | Query source |
| Sign-in | Client Secret, Client Certificate, Managed Identity / Azure CLI |
| Query languages | SQLite |
| Tables | 22 |
| Query templates | 102 |
| Website | microsoft.com |
Before you start
Huntbase can sign in to Microsoft 365 with any of these methods: Client Secret, Client Certificate, Managed Identity / Azure CLI. Pick one, create the credential in Microsoft 365, then keep it to hand for the Connect step.
Client Secret
Azure AD app registration using tenant ID
- In the Microsoft Entra admin center, browse to Entra ID › App registrations and select New registration. Enter a name, choose Single tenant only, and select Register.
- On the app's Overview page, record the Application (client) ID. You also need your tenant ID.
- Select API permissions › Add a permission › Microsoft Graph › Application permissions, add the read permissions listed below, and select Add permissions.
- Select Grant admin consent for your tenant and confirm.
- Select Certificates & secrets › Client secrets › New client secret, add a description and an expiration, and select Add. Copy the secret Value before you leave the page.
Permissions:
Calendars.ReadFiles.Read.AllGroup.Read.AllMail.ReadMailboxSettings.ReadSharePointTenantSettings.Read.AllTeam.ReadBasic.AllTeamMember.Read.AllUser.Read.All
Client Certificate
Azure AD app registration authenticating with a client certificate (PEM).
- Register the app, add the Microsoft Graph application permissions and grant admin consent, as for the client secret method.
- In the app registration, select Certificates & secrets › Certificates › Upload certificate.
- Select a
.cer,.pemor.crtfile and select Add.
Permissions:
Calendars.ReadFiles.Read.AllGroup.Read.AllMail.ReadMailboxSettings.ReadSharePointTenantSettings.Read.AllTeam.ReadBasic.AllTeamMember.Read.AllUser.Read.All
- Client secrets last at most 24 months, and Microsoft recommends less than 12. Plan to rotate the secret before it expires.
- Each connection covers a single tenant.
For the vendor's own instructions, see Microsoft Entra app registration documentation.
Use a dedicated, read-only credential for Huntbase where the product allows it. Huntbase only needs to read.
Connect Microsoft 365
- Go to Connections and click New connection, or click New connection on the Microsoft 365 product page.
- On Product, pick Microsoft 365 and choose the Owner.
- On Details, give the connection a Name and, optionally, a Description.
- On Connect, fill in the settings and credentials described below.
- On Verify, review the summary and click Create & check.
For everything else on the setup page — saving a draft, I'll do this later, and what each check result means — see Connections.
Settings
Where your Microsoft 365 lives:
| Field | Required | Notes |
|---|---|---|
| User ID or Email | No | The ID or email of the user whose own mailbox, calendar and drive you want to query, such as [email protected]. |
| Azure Environment | No | One of AZUREPUBLICCLOUD (the default), AZURECHINACLOUD or AZUREUSGOVERNMENTCLOUD. One of AZUREPUBLICCLOUD, AZURECHINACLOUD, AZUREUSGOVERNMENTCLOUD. Defaults to AZUREPUBLICCLOUD. |
| Tenant ID | No | Your Microsoft Entra tenant ID. Required for the client secret and client certificate methods, even though the field is optional. |
| Client ID | No | The Application (client) ID from the app's Overview page. Required for the client secret and client certificate methods, even though the field is optional. |
| Enable Managed Identity | No | |
| MSI Endpoint | No |
Credentials
Choose a Method, enter a Credential label (for example Production), then fill in the fields for that method.
Client Secret
| Field | Required | Notes |
|---|---|---|
| Client Secret | Yes | The secret Value that is shown once, when you create the secret. Secret — not shown again after you save it. |
Client Certificate
| Field | Required | Notes |
|---|---|---|
| Certificate Path | Yes | Secret — not shown again after you save it. |
| Certificate Password | No | Secret — not shown again after you save it. |
Managed Identity / Azure CLI
No fields — choose this method to connect without credentials.
Query it
Once connected, Microsoft 365 can serve these languages in a query tab, and Scout can use it when you ask in Auto:
| Language | Use it for |
|---|---|
| SQLite | SQL over the 22 tables listed below, alongside every other connected source. |
Example: SQLite
List basic contact info — Explore the basic contact information for individuals within your Microsoft 365 network.
select
display_name,
mobile_phone,
email_addresses
from
microsoft365_my_contact;
Microsoft 365 ships with 102 query templates. Find them in Library › Queries — see Query templates.
What syncs automatically
Microsoft 365 comes with a content pack. These queries run on a schedule on each new connection so the entities they find appear in the Activity Feed without you asking. You can turn syncing off from the connection's Synchronisation Settings card.
| Query | Finds |
|---|---|
| Sync users | user, ldap person |
| Sync groups | group |
| Sync user license assignments | user, product |
| Sync SharePoint site permissions | group, user |
| Sync verified domains | domain, organization |
Tables
Microsoft 365 adds 22 tables. Browse their columns from Schema in the query bar's ⋯ menu.
All 22 tables
| Table | Contains |
|---|---|
microsoft365_calendar | Metadata of the specified user's calendar. |
microsoft365_calendar_event | Events scheduled on the specified calendar. |
microsoft365_calendar_group | List all the calendar groups of specified user. |
microsoft365_contact | Contacts owned by the specified user. |
microsoft365_drive | Drives defined user's shared drives in the Google Drive. |
microsoft365_drive_file | Retrieves file's metadata or content owned by an user. |
microsoft365_group | Groups in Microsoft 365. |
microsoft365_list | SharePoint lists in Microsoft 365. |
microsoft365_mail_message | Retrieves messages in the specified user's mailbox. |
microsoft365_my_calendar | Metadata of the specified user's calendar. |
microsoft365_my_calendar_event | Events scheduled on the specified calendar. |
microsoft365_my_calendar_group | List all the calendar groups of specified user. |
microsoft365_my_contact | Contacts owned by the specified user. |
microsoft365_my_drive | Drives defined user's shared drives in the Google Drive. |
microsoft365_my_drive_file | Retrieves file's metadata or content owned by an user. |
microsoft365_my_mail_message | Retrieves messages in the specified user's mailbox. |
microsoft365_organization | Microsoft 365 organization information including SharePoint, authentication, security defaults, and security settings. |
microsoft365_organization_contact | Retrieve the list of organizational contacts for this organization. |
microsoft365_site | SharePoint sites in Microsoft 365. |
microsoft365_team | Retrieves all teams in Microsoft Teams for an organization. |
microsoft365_team_member | List the members associated with teams. |
microsoft365_user | Users in Microsoft 365. |
Next steps
- Connections — health, credentials and settings after you connect
- Query languages — syntax, parameters and time ranges
- Chatting with Scout — ask questions without writing a query
- All integrations — the rest of the catalog