MS Graph API error accessing mailbox

Troy Fisher 0 Reputation points
2024-01-29T22:46:57.9733333+00:00

We have a 3rd party helpdesk app that accesses a MS365 mailbox for sending/receiving ticket emails using MS Graph API. It has been configured and working for several months now, but this past Friday suddenly stopped. I have re-configured the app registration to no avail. When I try sending a test email from the app it produces the following error: Error sending test email: java.io.BufferedInputStream cannot be cast to com.microsoft.graph.models.extensions.Message When I force the app to query the mailbox for messages it produces the following error: Test Failed: java.io.BufferedInputStream cannot be cast to com.microsoft.graph.requests.extensions.MailFolderCollectionResponse I am not a developer, just a lowly Network Admin trying to figure out why it stopped working. If the above errors indicate a possible issue I'd appreciate any insight.

Microsoft Graph
Microsoft Graph
A Microsoft programmability model that exposes REST APIs and client libraries to access data on Microsoft 365 services.
10,649 questions
{count} votes

1 answer

Sort by: Most helpful
  1. Md Asif Muztaba 245 Reputation points Microsoft Vendor
    2024-01-30T01:06:19.98+00:00

    The errors you’re seeing are ClassCastException errors in Java. This type of error occurs when the code attempts to cast an object to a subclass of which it is not an instance. In your case, it seems like the application is trying to cast a java.io.BufferedInputStream object to com.microsoft.graph.models.extensions.Message and com.microsoft.graph.requests.extensions.MailFolderCollectionResponse, which is causing the issue.

    This could be due to a variety of reasons such as changes in the libraries or dependencies used by your application, updates in the MS Graph API, or even changes in the data being processed. Here are a few steps you could take to troubleshoot this issue: Check for updates: Ensure that all the libraries and dependencies used by your application are up-to-date. This includes the MS Graph SDK and any related libraries. Review recent changes: If there have been any recent changes to the application or its configuration, review these changes to see if they could be causing the issue. Contact the software vendor: Since the issue is with a 3rd party helpdesk app, it might be helpful to reach out to the software vendor for support. They might have encountered this issue before and could provide a solution. Engage a developer: If you’re unable to resolve the issue, it might be necessary to engage a developer. They would be able to delve deeper into the code and possibly identify and fix the issue.

    Remember, it’s always important to have a good backup and to test any changes in a controlled environment before applying them to your production system. I hope this helps, and I wish you the best of luck in resolving this issue! Please ACCEPT this answer if it helps you. Otherwise you can make comments.

    0 comments No comments