How to integrate my Office365 account?
Overview
To authenticate, you will need to provide the following information:
- Client ID
- Tenant ID
- Client Secret
Step 1: Login to Microsoft Entra (Azure AD) Portal
- Go to Microsoft Azure
- Sign in with the Microsoft account that has access to your Teams tenant (typically an admin account).
Step 2: Register Your Application
- Once logged in, go to "Microsoft Entra ID" from the left menu.
- Select "App registrations".
- Click on "+ New registration".
Fill the registration form:
- Name: Give your app a name (e.g., Office365 App)
- Supported account types: Choose
- Accounts in this organizational directory only (for single tenant)
- Redirect URI: Leave blank or add one if using OAuth login (e.g., https://localhost for testing)
- Click Register.
Step 3: Get the Client ID and Tenant ID
- After the app is registered, you will land on the app overview page.
- Copy the following:
- Application (client) ID → This is your Client ID
- Directory (tenant) ID → This is your Tenant ID
Step 4: Generate Client Secret
- Go to Certificates & secrets in the left sidebar
- Under Client secrets, click + New client secret
- Add:
- Description: (e.g., Teams App Secret)
- Expires: Select an expiration duration (e.g., 6 months or 1 year)
- Click Add
- Copy the Value immediately — this is your Client Secret
Required Microsoft Graph Permissions
Permissions | Description |
---|---|
User.Read.All | Read user profiles |
Group.Read.All | Read group metadata |
Directory.Read.All | Read directory data |
AuditLog.Read.All | Read sign-in logs (Admin only) |
How to Add these Permissions
- Go to Azure Portal
- Navigate to Microsoft Entra ID → App registrations
- Open your app → Go to API Permissions
- Click + Add a permission
- Select:
- Microsoft Graph
- Choose:
- Delegated permissions for interactive apps
- Application permissions for background apps
- Add the required permissions listed above
- Click Grant admin consent (needed for Application permissions)