BC 24 - Current User OnPrem

Ganesh2002Ganesh2002 Member Posts: 13
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.


lrlk93j785o7.png


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

Sign In or Register to comment.