Applies to Product - Dynamics 365 Supply Chain Management
What’s happening?
Customers encounter a "401 unauthorized invalid token" error when attempting to access the Inventory Visibility service. This issue may arise due to various reasons, including expired tokens or incorrect application credentials.
Reason:
The underlying causes for the "401 unauthorized" error may include: - The token has expired, which typically occurs after one hour. - Incorrect Application ID and Tenant ID used during the installation of the Inventory Visibility add-in. - A certificate or secret has expired in Azure, necessitating the creation of a new one. - Misconfiguration of the environment ID on the Inventory Visibility service.
Resolution:
To resolve the "401 unauthorized invalid token" issue, follow these steps:
1. Verify Credentials: Double-check that the credentials being used are correct.
2. Check Token Status: Confirm whether the same credentials were able to obtain a token previously but cannot do so now. If the token cannot be obtained, check if the secret has expired in Azure.
3. Refresh Token: - Navigate to the IV PowerApps, go to the operational visibility section from the left menu, and click the settings icon. - Enter the credential information and click the refresh token button to see if a valid token can be obtained.
4. Reinstall IV Add-in: If the token cannot be obtained from the IV PowerApps, uninstall the IV add-in from the LCS page and reinstall it, ensuring to enter the correct Application ID and Tenant ID.
5. Follow Documentation: For detailed steps on installing the Inventory Visibility add-in, refer to the public documentation: - Install the Inventory Visibility Add-in - Inventory Visibility API Authentication
6. Troubleshooting Guide: For further assistance, refer to the guide from the Troubleshooting documentation regarding the "401 unauthorized invalid token issue."
If the issue persists after following these steps, further investigation may be required, potentially involving the Product team for additional insights.
