#12140 [Email - SMTP Connector] Fix OAuth Base64URL token parsing
OAuth2 SMTP authentication now correctly decodes Base64URL tokens by normalizing them to standard Base64 before parsing, fixing intermittent authentication failures when JWT payloads contain URL-safe characters.
- 2files
- 1AL files
- 1objects
Pull request · merged into main (BC30) on 2026-10-01 by onbuyuka · 2 files (+16 -1), 1 AL · fix · tier official · reviewed (checked by Opus)
What changed
- Base64URL tokens are converted to standard Base64 format before decoding
- Fixes authentication failures when JWT payload contains ‘-’ or ‘_’ characters
- Regression test added to cover Base64URL-specific characters
- Existing username extraction and authentication flow unchanged
- Resolves issue where standard Base64 decoder raised invalid encoding errors
- Behaviour changes for users or extensions.
AL objects touched
- Codeunit 4516 “OAuth2 SMTP Authentication”, Email - SMTP Connector: modified
Context
- Work items: AB#652319
- Labels: AL: Apps (W1), Team: Integrations
- Systems: development
- From the description: “Normalize the OAuth access-token payload from Base64URL to standard Base64 before decoding it.”
Source: metadata of a merged pull request in microsoft/BCApps (bcapps): title, labels, changed paths and counts, with a summary in our words. No source text and no description beyond one short quote (D10, D61).