Creating an External Service for Accessing Microsoft Graph APIs
Creating the Azure AD Application
Step 1: Create an Azure AD Application
- Log in to Azure Portal
đ Go to Azure AD - App Registrations.
- Create a new application
- Click on âNew registrationâ.
- Name: Give a name to the application (e.g., `MTRMonitoringAPI`).
- Account types: Select âAccounts in this organizational directory onlyâ.
- Redirect URI: Leave empty if not used.
- Click on âRegisterâ.
Step 2: Retrieve Application Information
Step 3: Create a Client Secret
- Go to âCertificates & secretsâ (left menu).
- Create a new secret:
- Click on âNew client secretâ.
- Give it a name and choose an expiration period.
- Click on âAddâ.
- Copy the value immediately, as it will no longer be visible afterward.
Step 4: Assign Microsoft Graph Permissions
- Go to âAPI Permissionsâ.
- Click on âAdd a permissionâ.
- Select Microsoft Graph.
- Choose âApplication permissionsâ.
- Add the necessary permissions:
- `TeamworkDevice.Read.All`
- `TeamworkDevice.ReadWrite.All`
- Click on âAddâ.
- Return to âAPI Permissionsâ and click âGrant admin consent for the organizationâ.




