In the MuleSoft Connector using the OAuth Client Credentials connection type for Microsoft Dynamics 365, the below error is encountered:
error: Access token expired for resource owner id default
With Mule 4, the cause of the error, "Access token expired for resource owner id default" when using the OAuth Client Credentials Connection type for Microsoft Dynamics 365 is because the configured token URL is incorrect ("https://login.microsoftonline.com/oauth2/token").
Per the documentation, the URL should be "https://login.microsoftonline.com/{tenant}/oauth2/v2.0/token".
Configure the Token url field as "https://login.microsoftonline.com/{tenant}/oauth2/v2.0/token".
Also, configure the Scopes field as "https://{appID}/.default" (or scopes other than .default according to your requirement).
Important: After making changes to the Token url and Scopes fields, make sure you click OK and save the changes so that they take effect before you test the connection again.
001119207

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.