Jet.Shared.Office365LoginCancelledException When Connecting to Microsoft Dynamics 365 Business Central
Symptom
When you test or refresh a Business Central data source, the following error message is displayed:
Invoking the web service failed with the following message: Exception of type 'Jet.Shared.Office365LoginCancelledException' was thrown.
Cause
Jet Reports did not receive a completed Office 365 sign-in from Microsoft. The exception is raised when the sign-in prompt is closed or cancelled before it returns a token, or when the sign-in does not complete.
Resolution
- Sign out and sign back in to the Business Central data source in Jet Reports.
- In Excel, select the Jet Reports tab, then select Settings > Data Source Settings.
- In the left pane, select Authentication.
- Select Log out.
- Select Log in and sign in with your Business Central account. Complete the Microsoft sign-in prompt without closing it.
- Select OK, then select Test Connection to confirm the data source connects.
Verify the fix
The connection test completes without the error, and the report refreshes with Business Central data.
If the error continues, contact Product Support and include the Jet Reports version, the Business Central data source type (On-Premises or Cloud Web Services), the time the error occurred, and the authentication method set on the data source.