Applies to Product - Dynamics 365 Project Operations
What’s happening?
Customers encounter 401 Unauthorized errors when attempting to call the msdyn_ConvertProject API using cloud flows and plugins. Additionally, some customers experience 400 Bad Request errors when executing the same API from plugins.
Reason:
- The 401 error is typically caused by an authorization issue, where the token used does not have the necessary permissions to access the Dataverse resource.
- The 400 error may arise from incorrect API call structure or parameters, authentication issues, or incompatibility between the plugin's execution environment and the API requirements.
Resolution:
For 401 Unauthorized Error:
- Verify that the token being used is correctly obtained and has the necessary permissions to access the msdyn_ConvertProject API.
- Ensure that the Azure AD app registration used for authentication has the required permissions set for accessing the msdyn_ConvertProject API.
- Review the code used to obtain the token and ensure it aligns with the recommended practices.
- Check if there are any recent changes to the security roles or permissions of the user under which the cloud flow and plugin are executing.
- Ensure that the API call structure and parameters are correctly formatted. See Sample: Web access from a plug-in (Microsoft Dataverse) - Power Apps | Microsoft Learn for more information.
- Confirm that all required permissions are granted for the plugin to execute the msdyn_ConvertProject API call.
- Test the API call outside of the plugin (e.g., using Postman) to ensure the API itself is functioning as expected.
- If the issue persists, consider removing any customizations related to the msdyn_projectTask and msdyn_project entities, as they may be causing conflicts with the system plugins.
