Skip to main content

Notifications

Announcements

No record found.

Small and medium business | Business Central, N...
Suggested answer

Cannot verify AAD Registration in BC 24.

(3) ShareShare
ReportReport
Posted on by 20
We are currently upgrading from BC 22 to BC24 On Prem. We send notifications based on current user (in Email Accounts). In BC 24, it is not recognizing the Current User. When we add client id and secret in "Email Microsoft Entra application registration" and click "verify registration", we get an error.

 
 
When I check "Email Accounts", it does not recognize the my email address as shown below.
 

Steps to Troubleshoot
Identify the Uninitialized Variable:
The error suggests that the LastErrorMessage property of the ALAzureAdCodeGrantFlow class is being accessed, but the object has not been properly instantiated.
Check the code where the ALAzureAdCodeGrantFlow object is being used, and ensure that it is initialized correctly before any properties or methods are accessed.
 
this is the full error when I try to verify the app connection:
 
If requesting support, please provide the following details to help troubleshooting:
 
Error message: 
A DotNet variable has not been instantiated. Attempting to call Microsoft.Dynamics.Nav.Runtime.ALAzureAdCodeGrantFlow.LastErrorMessage in CodeUnit OAuth2Impl: GetLastErrorMessage
 
Internal session ID: 
94928f7a-3439-4dd3-bcfe-76cf7afe30db
 
Application Insights session ID: 
63cf8e26-1a06-4269-b683-99d2a864fb94
 
Client activity id: 
81c14eee-265b-92d1-2f5b-41352916bb62
 
Time stamp on error: 
2024-09-10T13:44:58.0500678Z
 
User telemetry id: 
4058806c-8d00-43e3-970f-ecda6f4d1bf5
 
AL call stack: 
OAuth2Impl(CodeUnit 502).GetLastErrorMessage line 2 - System Application by Microsoft
OAuth2(CodeUnit 501).GetLastErrorMessage line 2 - System Application by Microsoft
"Email - OAuth Client"(CodeUnit 4507).GetLastAuthorizationErrorMessage line 2 - Email - Outlook REST API by Microsoft
"Email - Outlook API Setup"(Page 4509).TestSetup line 6 - Email - Outlook REST API by Microsoft
"Email - Outlook API Setup"(Page 4509)."TestSetupAction - OnAction"(Trigger) line 2 - Email - Outlook REST API by Microsoft
 
 
  • Ganesh2002 Profile Picture
    Ganesh2002 20 on at
    Cannot verify AAD Registration in BC 24.
    @Yun Zhu, we have already setup the AAD registration. It works in BC22. It is not working in BC 24. Do we have any server settings in BC24?  
  • Suggested answer
    YUN ZHU Profile Picture
    YUN ZHU 75,595 Super User 2024 Season 2 on at
    Cannot verify AAD Registration in BC 24.
    Hi, It seems to be a setting problem. I hope the following information can give you some hints.
     
    And if this is a standard environment, you can submit a SR to Microsoft to ask them to help investigate.
     
    Hopefully other experts can give you better advice.
     
    Thanks
    ZHU

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

Congratulations 2024 Spotlight Honorees!

Kudos to all of our 2024 community stars! 🎉

Meet the Top 10 leaders for December!

Congratulations to our December super stars! 🥳

Get Started Blogging in the Community

Hosted or syndicated blogging is available! ✍️

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 291,642 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 230,371 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans