Lazarus
Home
Help
TinyPortal
Search
Login
Register
Lazarus
»
Forum
»
Announcements
»
Third party
»
Send mail with Microsoft Graph API (using Daraja HTTP Framework)
Free Pascal
Website
Downloads
Wiki
Documentation
Bugtracker
Mailing List
Lazarus
Website
Downloads (Laz+FPC)
Packages (OPM)
FAQ
Wiki
Documentation (RTL/FCL/LCL)
Bugtracker
CCR Bugs
GIT
Mailing List
Other languages
Foundation
Website
Useful Wiki Links
Project Roadmap
Getting the Source
Screenshots
How to use the forum
Forum Rules
About donations (wiki)
Bookstore
Computer Math and Games in Pascal
(preview)
Lazarus Handbook
Search
Advanced search
Recent
[ANN] fpGUI Toolkit v2.0....
by
Graeme
[
Today
at 02:57:36 am]
My AGGPas examples
by
Graeme
[
Today
at 02:52:48 am]
We are starting to use La...
by
dbannon
[
Today
at 02:15:01 am]
Reporting a Bug? in Strin...
by
Bart
[
Today
at 01:48:34 am]
QuestionDlg does strange ...
by
Martin_fr
[
Today
at 01:16:29 am]
SoundTracker Player Libra...
by
hukka
[
Today
at 01:01:39 am]
it2play - IT/S3M module r...
by
hukka
[
Today
at 12:47:05 am]
Reflection and Review in ...
by
jwdietrich
[February 14, 2026, 09:53:31 pm]
How to determine the unkn...
by
Roland57
[February 14, 2026, 09:42:26 pm]
fpGUI Toolkit v2.0.1 has ...
by
cdbc
[February 14, 2026, 09:32:46 pm]
LazReport
by
dseligo
[February 14, 2026, 08:51:08 pm]
Howto : Double buffer wit...
by
biologic
[February 14, 2026, 06:42:42 pm]
how to enable multihelper...
by
PascalDragon
[February 14, 2026, 06:30:05 pm]
Free Pascal for a small e...
by
devEric69
[February 14, 2026, 06:19:36 pm]
Fast Canvas Library V1.05...
by
backprop
[February 14, 2026, 05:46:10 pm]
Are the source files for ...
by
Derz
[February 14, 2026, 05:12:27 pm]
[ANN] PasBuild 1.3.0 rele...
by
Graeme
[February 14, 2026, 05:02:32 pm]
Frustrating Error When us...
by
jamie
[February 14, 2026, 04:22:29 pm]
; after then
by
Curt Carpenter
[February 14, 2026, 04:09:29 pm]
Help needed compiling
by
jamie
[February 14, 2026, 03:58:08 pm]
Does not go out of functi...
by
Martin_fr
[February 14, 2026, 03:43:52 pm]
How to start LAMW emulato...
by
RaketeMike
[February 14, 2026, 12:44:46 pm]
ThorVG - test (lightweigh...
by
Antek
[February 14, 2026, 12:35:09 pm]
Questions from a Windows ...
by
hedgehog
[February 14, 2026, 12:20:15 pm]
[ANN] fpGUI Toolkit v2.0....
by
Fred vS
[February 14, 2026, 11:43:13 am]
« previous
next »
Print
Pages: [
1
]
Author
Topic: Send mail with Microsoft Graph API (using Daraja HTTP Framework) (Read 1632 times)
mjustin
Full Member
Posts: 206
Send mail with Microsoft Graph API (using Daraja HTTP Framework)
«
on:
January 06, 2024, 08:59:08 pm »
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.
Requirements:
- Daraja HTTP Framework source and source/optional units.
- Indy 10.6.2 (
https://github.com/IndySockets
)
- OpenSSL DLLs for Indy (
https://github.com/IndySockets/OpenSSL-Binaries
)
- Delphi 2009+ or Lazarus / FPC 3.2
Example source code:
-
https://github.com/michaelJustin/daraja-framework/tree/master/demo/tutorial12
Daraja HTTP Framework download:
-
https://github.com/michaelJustin/daraja-framework
Feature overview:
-
https://www.habarisoft.com/daraja_framework.html
Getting Started PDF:
-
https://www.habarisoft.com/daraja_framework/2.7.1/docs/DarajaFrameworkGettingStarted.pdf
«
Last Edit: January 07, 2024, 12:05:55 pm by mjustin
»
Logged
mjustin
Full Member
Posts: 206
Re: Send mail with Microsoft Graph API (using Daraja HTTP Framework)
«
Reply #1 on:
January 24, 2024, 06:33:41 pm »
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
Logged
Print
Pages: [
1
]
« previous
next »
Lazarus
»
Forum
»
Announcements
»
Third party
»
Send mail with Microsoft Graph API (using Daraja HTTP Framework)
TinyPortal
© 2005-2018