MSAL Python is a production-grade OAuth2/OIDC client library for the Microsoft identity platform (Entra ID / Azure AD, ADFS, MSA). It implements the full token acquisition lifecycle: authorization code, client credentials, device code, ROPC, on-behalf-of, and managed identity flows, plus WS-Trust for legacy ADFS federation. The library exposes two primary application classes — PublicClientApplication (desktop/mobile) and ConfidentialClientApplication (web apps/daemons) — built on a shared ClientApplication base with an embedded oauth2cli sub-package for low-level OAuth2 protocol handling. It also supports broker integration via pymsalruntime, proof-of-possession tokens, and regional endpoints.
django-auth-adfs is a Django authentication backend that enables integration with Microsoft ADFS and Azure AD for single sign-on (SSO). It implements OAuth2 and OpenID Connect flows to authenticate users against enterprise identity providers, automatically creating and updating Django users based on identity claims. The package provides Django authentication backends, middleware for enforcing authentication, URL handlers for the OAuth2 flow, and Django REST Framework integration for token-based API authentication. The architecture follows Django best practices with clear separation of concerns between configuration, backend logic, views, and middleware.
This repository is a collection of sample applications and scripts demonstrating how to embed Power BI reports, dashboards, and tiles into custom applications. It covers two primary embedding scenarios: 'App Owns Data' (service principal or master user authentication) and 'User Owns Data' (delegated user authentication). The samples are implemented in multiple languages and frameworks, including ASP.NET Core, ASP.NET Framework, Python Flask, Node.js Express, Java Spring MVC, and React-TS, providing a consistent pattern across stacks. Additionally, the repo includes credential encryption samples for Power BI on-premises gateway data sources, implementing asymmetric key encryption (RSA-OAEP with AES-256-CBC and HMAC-SHA256), and a set of PowerShell scripts for administrative tasks such as workspace management, deployment pipelines, and dataset refresh. The code is explicitly educational and not production-ready. It focuses on demonstrating the integration flow with the Power BI REST API and Azure AD authentication. While the samples are functional, they suffer from significant duplication across languages, with nearly identical logic reimplemented in each stack. Many dependencies are outdated (e.g., cryptography 3.4.6, Flask 2.1.2, msal 1.9.0, React 16), and the code lacks automated tests. The encryption helpers, however, are well-structured and isolated, making them potentially reusable in other projects that need to encrypt credentials for Power BI gateways. Overall, the repository serves as a practical reference for developers learning Power BI embedding, but it requires careful updating and hardening for production use.