mjustin 23 Posted January 6 (edited) Send mails via the Graph API: a new example project for the Daraja HTTP Framework demonstrates how to get an access token using the implicit grant flow, and how to invoke the Graph API to send an email. No additional configuration is required, as the project uses an existing Microsoft Entra App registration , which is limited to the permissions for reading the user profile and sending emails. You may configure your own App registration and use its Application (client) ID in the source code of unit MainUnit, or contact me to provide a modified App registration. Edited January 7 by mjustin Tag added Share this post Link to post
mjustin 23 Posted January 24 Update / new blog post: Microsoft identity platform and OAuth 2.0 authorization code flow example for Daraja HTTP Framework The Authorization Code Flow with Proof Key for Code Exchange (PKCE) is a recommended OAuth 2.0 flow for native apps. No client secret is required in this flow. Instead, a secret is created by the calling application that can be verified by the authorization server. The example application requests an authorization code, redeems the code for an access token, and then calls the Microsoft Graph API to retrieve user profile data, and to send an email on behalf of the signed-in user. Software requirements * Daraja HTTP Framework (https://github.com/michaelJustin/daraja-framework). The example code is located in the entra_auth_code_flow folder of the master branch. * Indy (https://github.com/IndySockets) with OpenSSL DLLs for Indy (https://github.com/IndySockets/OpenSSL-Binaries) * JsonDataObjects (https://github.com/ahausladen/JsonDataObjects) Daraja HTTP Framework download: - https://github.com/michaelJustin/daraja-framework Share this post Link to post