I am tasked with updating a legacy Windows VCL application, built in Delphi XE3, to change its authentication method. Currently, it uses direct LDAP queries against an on-premise Active Directory to authenticate a user and check their membership in a specific security group.
The requirement is to replace this with authentication against Microsoft Entra ID (formerly Azure Active Directory).
Current Process:
The app takes a username and password.
It performs an LDAP bind to an on-premise AD server.
On success, it queries the user's memberOf attribute to verify membership in a required group.
The Technical Challenge: My research points towards using OAuth 2.0/OIDC for the authentication flow and the Microsoft Graph API to check for group membership. However, I am facing a knowledge gap on how to implement this within the constraints of a native Delphi XE3 application. The majority of Microsoft's documentation targets web apps or newer frameworks.
Any advice on this would be much appreciated.