Reflex Logo
Blog
Builder
Squares Vertical DocsSquares Vertical Docs

How to Build a Dashboard With Azure Auth / Microsoft Entra ID (Azure AD) in 2026

Learn how to build a dashboard with Azure Auth and Microsoft Entra ID (Azure AD) using Python. Complete guide for identity teams in April 2026.

Tom Gotsman

TLDR:

  • You can build Python dashboards that pull sign-in logs, user provisioning, and audit trails from Microsoft Graph API without writing JavaScript
  • Reflex keeps Graph API calls, OAuth flows, and UI updates in one Python codebase with 60+ components for tables and charts
  • Deploy to Reflex Cloud with reflex deploy or self-host in VPCs for HIPAA/PCI-DSS compliance requirements
  • Reflex is an open-source Python framework for building full-stack web apps, trusted by 40% of Fortune 500 companies

Azure Entra ID sign-in logs capture a wealth of information about user authentication activity, including who signed in, from where, and with what device. When that data flows into a well-built dashboard, security and identity teams stop hunting through portals and start actually understanding what's happening across their organization.

With Reflex, you can pull from Microsoft Graph API endpoints and build Python-based dashboards that surface the data that matters most to your team:

  • Sign-in activity logs with user, location, device, and risk score breakdowns
  • User provisioning status and lifecycle event tracking
  • Group membership changes and conditional access policy enforcement summaries
  • Audit trails for compliance reporting and access reviews
  • Time-series visualizations of authentication failures and risk spikes

These dashboards serve a few distinct audiences. SOC analysts use them to catch suspicious sign-in patterns early. Compliance officers generate audit reports without digging through raw logs. Identity admins track provisioning errors before they become support tickets. Turning on auditing and storing results in a Log Analytics Workspace makes detailed analysis of application usage, sign-in experience, and guest activity possible across your entire tenant.

The use cases here are read-focused: monitoring, reporting, and reviewing. You are building the visibility layer that makes your existing Entra ID setup actually legible.

The biggest friction point with dashboard tooling for identity and security teams is the split stack. Backend engineers know Python. They know how to call Microsoft Graph API, parse token claims, and handle OAuth flows. What they shouldn't need to learn is React state management or TypeScript build tooling.

Reflex keeps everything in one Python codebase. You can call Graph API endpoints using libraries like msal or requests directly inside Reflex event handlers, no middleware layer required. The 60+ built-in components handle tables, charts, and live-updating UI elements without a single line of JavaScript. State updates propagate to the frontend automatically, so when new sign-in events arrive, the UI reflects them without any client-side synchronization logic.

"It's like Streamlit for adults. It's fast, it looks good, and we don't need to throw it away after prototyping." - Delta Global Head of Quant

That quote captures what most identity teams run into: Streamlit gets you a prototype, but not a production dashboard. Reflex gets you both. When a compliance requirement changes or a new conditional access policy needs tracking, your Python engineers can modify the dashboard directly. No handoff to a frontend team. No reading someone else's compiled JavaScript. Just Python, end to end.

Connecting Entra ID to a Reflex app starts with the Microsoft Graph Python SDK, which supports both sync and async credential classes from Azure Identity. You authenticate using the OAuth 2.0 client credentials flow for service-to-service calls, or delegated permissions when your dashboard acts on behalf of signed-in users. Either path runs entirely inside Reflex event handlers with no extra infrastructure.

Here's the general pattern for how your app connects:

  • Store your tenant_id, client_id, and client_secret in Reflex state or environment variables so credentials never appear in source code.
  • Initialize a credential object using ClientSecretCredential from the azure-identity package, which handles token acquisition automatically.
  • Pass that credential to the Graph SDK's GraphServiceClient to get a typed, authenticated Graph API client.
  • Call Graph endpoints like /auditLogs/signIns or /users directly from event handlers to pull real identity data into your dashboard state.
  • Handle token refresh and credential rotation inside those same handlers, keeping auth logic co-located with your data fetching.

One practical advantage: Reflex's project-level integration configuration lets you define your Entra ID credentials once and share them across every dashboard in the same project. If your tenant ID or client secret rotates, you update it in one place and all applications inherit the change automatically, which matters when you're running separate dashboards for SOC, compliance, and identity admin teams under the same project umbrella.

Building useful Entra ID dashboards comes down to picking the right component for each data shape. The Microsoft Graph API returns structured identity data, and Reflex has a matching component for each type.

Sign-in logs return tabular data with timestamps, user principals, IP locations, device details, and authentication methods. Reflex's data table component displays these as paginated, sortable views with inline filtering. Computed vars handle calculated metrics like failed sign-in rates before anything reaches the UI.

Sign-in patterns over time map naturally to line or area charts. Reflex's chart components consume time-bucketed aggregations directly from state variables, with background event handlers polling Graph for new data and pushing updates without a page reload.

Stat cards surface aggregate metrics like MFA enrollment rates or policy violations pulled from Graph user and group endpoints. Filter controls let admins scope by group, application, or risk level. Each filter change triggers an event handler that rebuilds the Graph query and refreshes state in place.

Dashboard ComponentEntra ID Data SourceReflex ComponentUse Case
Sign-in event tableSignInLogs endpointrx.data_tableSecurity incident investigation
Authentication chartSignInLogs aggregationrx.recharts.line_chartTrend analysis over time
MFA enrollment cardUser.Read.Allrx.statCompliance metrics
Risk filterIdentityProtection APIrx.selectScope dashboard by risk level

Deploying your dashboard takes a single command: reflex deploy. That packages your Graph API integration, state management, and UI into one artifact, skipping the need for separate frontend and backend pipelines. Reflex Cloud then handles multi-region provisioning, WebSocket scaling for real-time authentication event updates, and CI/CD hooks for GitHub Actions or GitLab CI.

For identity teams operating under HIPAA, PCI-DSS, or similar compliance frameworks, sensitive authentication data rarely belongs in a shared cloud environment. Reflex supports self-hosted deployments into VPC environments or on-premises Kubernetes clusters via Helm charts, keeping sign-in logs and credential configuration entirely within your security perimeter. Your Entra ID client secrets stay in project-level environment variables, never in source code, and rotate without touching individual dashboard configs.

Whether you ship to Reflex Cloud or a private cluster, the deployment experience stays consistent across both paths.

Yes. Reflex is a pure Python framework that handles both backend and frontend, so you can build complete Entra ID dashboards calling Microsoft Graph API endpoints without writing any JavaScript. The framework's 60+ built-in components render tables, charts, and live-updating UI elements while your Python code manages state and API calls.

Streamlit works for quick prototypes but breaks under production load due to its script rerun model, which re-executes your entire app on every interaction and has no server push capability. Reflex uses event-based architecture with WebSocket state synchronization, making it production-ready for security and identity teams who need real-time sign-in monitoring and authentication event tracking at scale.

Install the Microsoft Graph Python SDK and Azure Identity libraries, authenticate with ClientSecretCredential using your tenant credentials, then call Graph endpoints like /auditLogs/signIns directly from Reflex event handlers. Your dashboard state updates automatically and the UI reflects new authentication events without client-side synchronization code.

Run reflex deploy for cloud deployment with automatic multi-region scaling, or use Reflex's Helm charts to deploy into your VPC or on-premises Kubernetes cluster if compliance frameworks like HIPAA or PCI-DSS require keeping sign-in logs within your security perimeter. Project-level credential configuration means your Entra ID client secrets stay in environment variables and rotate without touching individual dashboard configs.

Use the OAuth 2.0 client credentials flow with ClientSecretCredential for service-to-service dashboards that pull sign-in logs and audit data on a schedule without user interaction. Switch to delegated permissions when your dashboard performs actions on behalf of signed-in users, like scoping data by the user's own group memberships or enforcing row-level access controls.

Built with Reflex