BC 24 - Current User OnPrem

Ganesh2002
Member Posts: 14
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.

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

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
0
Categories
- All Categories
- 73 General
- 73 Announcements
- 66.6K Microsoft Dynamics NAV
- 18.7K NAV Three Tier
- 38.4K NAV/Navision Classic Client
- 3.6K Navision Attain
- 2.4K Navision Financials
- 116 Navision DOS
- 851 Navision e-Commerce
- 1K NAV Tips & Tricks
- 772 NAV Dutch speaking only
- 617 NAV Courses, Exams & Certification
- 2K Microsoft Dynamics-Other
- 1.5K Dynamics AX
- 320 Dynamics CRM
- 111 Dynamics GP
- 10 Dynamics SL
- 1.5K Other
- 990 SQL General
- 383 SQL Performance
- 34 SQL Tips & Tricks
- 35 Design Patterns (General & Best Practices)
- 1 Architectural Patterns
- 10 Design Patterns
- 5 Implementation Patterns
- 53 3rd Party Products, Services & Events
- 1.6K General
- 1.1K General Chat
- 1.6K Website
- 83 Testing
- 1.2K Download section
- 23 How Tos section
- 252 Feedback
- 12 NAV TechDays 2013 Sessions
- 13 NAV TechDays 2012 Sessions