Aiyoda

Entra ID App Registration for Microsoft Graph

Step-by-step guide to creating an Entra ID App Registration for Aiyoda's Microsoft 365 Graph discovery capabilities.

v3.6 · Updated 2026
ℹ️
What is this for? To discover Microsoft 365 data in Aiyoda, you need to register an application in Microsoft Entra ID (formerly Azure Active Directory) and grant it Microsoft Graph API permissions. This gives Aiyoda read-only access to your M365 tenant data without using a user account or password.
6
Steps to Complete
~15
Minutes to Complete
Read-Only
Permissions Required
Prerequisites
✅ What You Need Before Starting
Step-by-Step App Registration
1

Navigate to App Registrations

Open the Azure Portal and go to Microsoft Entra ID

a

Sign in to portal.azure.com with your admin account.

b

In the search bar at the top, type "Microsoft Entra ID" and select it.

c

In the left sidebar, click "App registrations" under the Manage section.

d

Click the "+ New registration" button at the top of the page.

2

Register the Application

Fill in the app details and create the registration

a

Name: Enter a meaningful name, e.g. "Aiyoda-Discovery"

b

Supported account types: Select "Accounts in this organizational directory only (Single tenant)"

c

Redirect URI: Leave this blank, Aiyoda uses client credentials flow (no user redirect needed)

d

Click the "Register" button to create the app.

💡 After registering, you will land on the app's Overview page. Copy and save the Application (client) ID and Directory (tenant) ID, you'll need these for the Aiyoda configuration.
3

Create a Client Secret

Generate credentials for Aiyoda to authenticate with

a

In the left sidebar click "Certificates & secrets" under Manage.

b

Click "+ New client secret".

c

Description: Enter "Aiyoda Secret" (or similar).

d

Expires: Select an appropriate expiry period.12 months (recommended).

e

Click "Add". Immediately copy the Secret Value shown as it will be hidden after you leave this page.

⚠️ Important: Copy the secret Value immediately. Once you navigate away from this page, the full value is hidden and you will need to create a new secret.
4

Assign Graph API Permissions

Grant Aiyoda the read-only permissions it needs

a

Click "API permissions" in the left sidebar.

b

Click "+ Add a permission" → Select "Microsoft Graph" → Select "Application permissions".

c

Search and add each of the required permissions listed in the table below.

d

Click "Add permissions" to save, then click "Grant admin consent for [your tenant]" and confirm.

PermissionTypePurpose
User.Read.AllApplicationRead all users in your M365 tenant
Device.Read.AllApplicationRead all devices in your M365 tenant
Directory.Read.AllApplicationRead directory data (users, groups, devices)
Organization.Read.AllApplicationRead organization/tenant information
DeviceManagementApps.Read.AllApplicationRead Microsoft Intune apps
DeviceManagementManagedDevices.Read.AllApplicationRead Intune managed device inventory
AuditLog.Read.AllApplicationRead audit log data for licence compliance
Subscription.Read.AllDelegatedRead licence assignments for users
IdentityRiskyUser.Read.AllApplicationRead all identity risky user information
Policy.Read.ConditionalAccessApplicationRead your organization's conditional access policies
Policy.Read.AllApplicationRead your organization's policies
Reports.Read.AllApplicationRead all usage reports
SecurityEvents.Read.AllApplicationRead your organization’s security events
Sites.Read.AllApplicationRead items in all site collections
UserAuthenticationMethod.Read.AllApplicationRead all users' authentication methods
ReportSettings.Read.AllApplicationRead all admin report settings
⚠️ Admin consent required: Application permissions require a Global Administrator to click "Grant admin consent". Without this step, the app will receive authentication errors.
5

Grant Power Platform & Power BI Access

Enable Power Apps, Power Automate and Power BI discovery for the Power Platform Insights dashboard

Power Platform and Power BI are administered separately from Microsoft Graph, so they use their own access grant rather than an API permission. Both use the same Client ID and Client Secret from Step 3, so no new credentials are needed.

a

In Microsoft Entra ID, go to Roles and administrators and search for "Power Platform Administrator".

b

Click "+ Add assignment", search for the app registration by name (e.g. "Aiyoda-Discovery"), and select it.

c

The role alone is not enough for an app — the Power Platform admin APIs also require it to be registered as a management app. A Global Administrator or Power Platform Administrator runs the following once in Windows PowerShell, signing in when prompted and replacing the ID with the app's Application (client) ID from Step 3:

Install-Module Microsoft.PowerApps.Administration.PowerShell -Scope CurrentUser
Add-PowerAppsAccount
New-PowerAppManagementApp -ApplicationId xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx
d

Confirm the registration with Get-PowerAppManagementApps — the app's client ID should be listed. Together with the role, this lets Aiyoda read environments, Power Apps and Power Automate flows through the Power Platform admin APIs.

e

In the Fabric admin portal, open Tenant settings → Admin API settings and enable "Service principals can access read-only admin APIs." This is not the similarly named "Service principals can use Fabric APIs" under Developer settings.

f

Apply the setting to a security group, then add this app registration's service principal to that group.

g

This lets Aiyoda read workspaces, reports, datasets, dashboards and viewer activity through the Power BI admin APIs.

RequirementGranted inPurpose
Power Platform AdministratorEntra RoleEnvironments, Power Apps and Power Automate flows
New-PowerAppManagementAppPowerShellRegisters the app so the Power Platform admin APIs accept it
Service principals can access read-only admin APIsFabric SettingPower BI workspaces, reports, datasets, dashboards and activity
Security group membershipFabric SettingApplies the setting above to this app's service principal
⚠️ Do not add Power BI Service API permissions to this app. The Power BI admin APIs reject a service principal that carries any admin-consented Power BI Service permission — leave that section empty and rely on the Fabric setting above instead.
💡 Optional: Every source degrades independently. If this step is skipped, the rest of Aiyoda continues to work and the Power Platform Insights dashboard shows setup instructions for whichever source isn't yet granted.
6

Configure Aiyoda with Your App Details

Enter the details into the Aiyoda console

In the Aiyoda console, navigate to the Microsoft 365 Scan configuration and enter the following values collected from the previous steps:

Tenant ID : xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx // From App Overview → Directory (tenant) ID Client ID : xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx // From App Overview → Application (client) ID Client Secret : your-secret-value-here // From Certificates & secrets → Value
a

Open the Aiyoda Console and navigate to Scan Settings → Microsoft 365.

b

Paste your Tenant ID, Client ID, and Client Secret into the respective fields.

c

Click "Test Connection" to verify Aiyoda can authenticate successfully.

d

Once the connection test passes, you can run a Microsoft 365 Discovery.

✅ Success indicator: After a successful connection test you are now ready to scan your M365 environment.
Security Best Practices
Keeping Your App Secure
  • Rotate secrets regularly — Set calendar reminders before expiry (12 months recommended)
  • Limit permissions — Only grant the permissions listed above, nothing more
  • Store secrets securely — Never store the client secret in plain text or source control
  • Monitor sign-ins — Review the app's sign-in logs in Entra ID periodically
  • Dedicated app — Use a dedicated registration for Aiyoda only
Troubleshooting Common Issues
  • 401 Unauthorized — Check that admin consent was granted for all permissions
  • 403 Forbidden — A required permission may be missing from the list
  • Secret expired — Create a new client secret and update Aiyoda config
  • Invalid tenant — Verify the Tenant ID matches your M365 directory
  • Consent not granted — Global Admin must approve permissions in Entra ID