Sending emails via modern, token-based authentication (OAuth 2.0)
Sending emails directly from our low-code platform is a central component of many applications - using OAuth 2.0, emails can be sent via access tokens in a future-proof, compatible and secure manner.
What is OAuth 2.0?
OAuth 2.0 is an open standard for secure authorization. Instead of storing usernames and passwords in plain text, an access token issued by an authorization server (e.g., Microsoft or Google) is used. This token is time-limited and can be automatically renewed if necessary (refresh token).
Advantages of OAuth 2.0:
- Authentication is performed with access tokens, not with permanently stored passwords.
- Tokens are time-limited and can be securely renewed (refresh tokens).
- Access can be restricted on a granular basis and revoked at any time.
- Meets the current requirements of major email providers (including Microsoft and Google).
1. Configurations in the Microsoft Azure Portal
- To create a new app registration in the Microsoft Azure Portal and generate the client secret key - which will later be used as a password in GAPTEQ Designer - follow the steps described in point 1 of this article.
2. Store access authorization
- A new permission can be created using the “Add a permission” button - “Microsoft Graph” - “Mail.Send” (Type: Application).
Tip! All other permissions should be removed for security reasons.
- The request for the new permission now has the status “not granted” (indicated by the small blue exclamation mark) until the configurations are confirmed by an administrator.
- After confirmation, a small green check mark with “Granted for ...” will appear.
3. Store mail server in GAPTEQ
- In GAPTEQ Designer, you can now select the type for sending emails under “Repository configuration” and the “Mail server” tab.
- Select the desired “OAuth 2.0 - Azure, Office 365 & Outlook” authentication method here.
- The Tenant ID, Client ID, and Client Secret Key parameters created earlier can now be used.
Note! To learn how to create email templates and configure the Mail Sender component, read this article: Personalized Mail Delivery.