web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

No record found.

News and Announcements icon
Community site session details

Community site session details

Session Id :
Small and medium business | Business Central, N...
Answered

Third-party oAuth

(5) ShareShare
ReportReport
Posted on by 43
Hi,
 
I need to authenticate third-party connection and get the code within BC, so user does not need to manually copy the authentication code.
 
will it be API or oAuth codeunit 
 
currently I am using hyperlink in BC and asking user to copy the code manually after authentication
so it open the 3rd party URL, user login as normal and get the code from redirect url.
 
result image is attached.
 
Thank you
 
 
auth.PNG
I have the same question (0)
  • Suggested answer
    OussamaSabbouh Profile Picture
    12,808 Super User 2026 Season 1 on at
    Hello,
     
    You can’t capture the OAuth code from a browser redirect in AL.
    To avoid manual copy/paste, you must use BC’s OAuth2 codeunit + OAuthLanding.htm.
     
    That is the only built-in way for BC to automatically receive the authorization code.
     
    Regards,
    Oussama Sabbouh
  • AJ-21111653-0 Profile Picture
    43 on at
    Thank you Oussama
     
    Do you have any code for this please?
    do I have to use control addin?
     
    Thanks
     
  • Verified answer
    Aman Kakkar Profile Picture
    2,977 Super User 2026 Season 1 on at
     
    You need to do an App Registration first in Azure Portal for your Business Central tenant, then only you will be able to use the APIs for GET/POST/PATCH requests.
     
    Here is a step by step guide, and code for OAuth 2.0 by YUN ZHU which you can refer for starting off - Dynamics 365 Business Central: How to use OAuth 2.0 in AL with SecretText (Using codeunit 501 OAuth2) | Dynamics 365 Lab
     
    Do mark it as verified if this helps.
    Aman K
  • Verified answer
    Gerardo Rentería García Profile Picture
    25,555 Most Valuable Professional on at
  • Suggested answer
    Jainam M. Kothari Profile Picture
    15,732 Super User 2026 Season 1 on at

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Stars!

Congratulations to our 2025 Community Spotlights

Thanks to all of our 2025 Community Spotlight stars!

Leaderboard > Small and medium business | Business Central, NAV, RMS

#1
OussamaSabbouh Profile Picture

OussamaSabbouh 1,926 Super User 2026 Season 1

#2
YUN ZHU Profile Picture

YUN ZHU 1,158 Super User 2026 Season 1

#3
Khushbu Rajvi. Profile Picture

Khushbu Rajvi. 533 Super User 2026 Season 1

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans