In applications using the Microsoft Outlook 365 Connector, calls to Microsoft Graph succeed initially but fail after the OAuth token expires (typically after 60 minutes). All subsequent requests fail until the application is restarted.
The following error is raised:
Message : Invalid token lifetime. Element : (None) Element DSL : (None) Error type : OUTLOOK365:INVALID_CREDENTIALS FlowStack : (None)
The application logs may also display the following warning:
WARN com.mulesoft.connector.outlook365.internal.connection.Outlook365Connection: event:[EVENT_ID] Couldn't execute because a module exception has occurred. An exception will be thrown. Root exception was: Invalid token lifetime. at com.mulesoft.connector.outlook365.internal.service.Outlook365Service.handleResponse(Outlook365Service.java:203)
In Microsoft Outlook 365 Connector versions 1.3.1 and earlier, the connector does not recognize non-standard HTTP 401 Unauthorized responses or empty error payloads returned by Microsoft Graph when an access token expires. Because the connector does not recognize that the token has expired, it does not trigger the OAuth token refresh routine, continues to reuse the expired access token, and repeatedly throws OUTLOOK365:INVALID_CREDENTIALS.
Update the Microsoft Outlook 365 Connector to version 1.3.2 or later to enable proper handling of 401 error responses and token refresh routines.
pom.xml file.mule4-outlook365-connector dependency and update the <version> to 1.3.2 or later:<dependency>
<groupId>com.mulesoft.connectors</groupId>
<artifactId>mule4-outlook365-connector</artifactId>
<version>1.3.2</version>
<classifier>mule-plugin</classifier>
</dependency>
005462359

We use three kinds of cookies on our websites: required, functional, and advertising. You can choose whether functional and advertising cookies apply. Click on the different cookie categories to find out more about each category and to change the default settings.
Privacy Statement
Required cookies are necessary for basic website functionality. Some examples include: session cookies needed to transmit the website, authentication cookies, and security cookies.
Functional cookies enhance functions, performance, and services on the website. Some examples include: cookies used to analyze site traffic, cookies used for market research, and cookies used to display advertising that is not directed to a particular individual.
Advertising cookies track activity across websites in order to understand a viewer’s interests, and direct them specific marketing. Some examples include: cookies used for remarketing, or interest-based advertising.