Getting below error while activating Cloud POS in D365.
Event Viewer log:
The description for Event ID 5075 from source Microsoft-Dynamics-Commerce-RetailServer cannot be found. Either the component that raises this event is not installed on your local computer or the installation is corrupted. You can install or repair the component on the local computer.
If the event originated on another computer, the display information had to be saved with the event.
The following information was included with the event:
Authentication failed
Microsoft.Dynamics.Commerce.Runtime.UserAuthenticationException: The audience validation failed.
at Microsoft.Dynamics.Retail.RetailServerLibrary.Authentication.JwtTokenValidator.ValidateAudiences(IEnumerable`1 receivedAudiences, JwtSecurityToken token)
at Microsoft.Dynamics.Retail.RetailServerLibrary.Middlewares.Exceptions.ExceptionHelper.ValidateAudiencesAndCaptureException(Action`2 validateAudiences, IEnumerable`1 audiences, JwtSecurityToken token)
at System.IdentityModel.Tokens.JwtSecurityTokenHandler.ValidateToken(String securityToken, TokenValidationParameters validationParameters, SecurityToken& validatedToken)
at Microsoft.Owin.Security.Jwt.JwtFormat.Unprotect(String protectedText)
at Microsoft.Owin.Security.OAuth.OAuthBearerAuthenticationHandler.<AuthenticateCoreAsync>d__0.MoveNext()
Microsoft.Owin.Security.OAuth.OAuthBearerAuthenticationMiddleware
0
The publisher has been disabled and its resource is not available. This usually occurs when the publisher is in the process of being uninstalled or upgraded
i face same issue file activating MPOS with customization. this is one warning i have in event viewer :
1. AzureActiveDirectoryUserAuthenticationProvider.acquireTokenWithParam skipped accessing current user's information because corresponding data structure was not initialized.
2. DeviceAuthenticationProvider.acquireToken did not find a device token in the application stroage.
3. Server response status code is '401'.
4. Unauthorized response with error: The audience validation failed.. ErrorResourceId: Microsoft_Dynamics_Commerce_Runtime_InvalidAudience with Correlation Id:
5. The Retail Server Request with request id '-------------' and request url '--------------/Commerce/ActivateDevice?api-version=7.3' failed. Error: The audience validation failed., Status code 401.
6.Chained request execution failed.
7.Device Activation failed. Errors=[{"errorCode":"Microsoft_Dynamics_Commerce_Runtime_InvalidAudience","message":"The audience validation failed. Contact your system administrator to set up identity providers properly in retail headquarters.\r\n- If you are using Personnel ID and Password logon, make sure relying parties are correctly configured.\r\n- If you are using Azure AD logon, make sure both relying parties and server resource ids are correctly configured."}];
(Made sure AADClientId and AADRetailServerResourceId in DllHost.exe file is same as in the HQ parameter relying party and server resource id. )
8. The device activation operation failed.
Hi Have you resolved this issue?
That error means a misconfiguration between CPOS configuration file and HQ. To be specific, it is either Relying Party or Server Resource ID (see last screenshots in How to configure CPOS to use your own Azure AD application) do not match to CPOS configuration parameters described in the 5c.
Hi,
I found your comment on research the topics issue. Sadly I can not see your screenshot.
Would it be possible that you share this image (or describe the parameter) again?
Regards,
Ulrich
Can you re-post the parameter? It is not visible on this page now.
Have you fix this error already?
This warning in Retail Server log is followed/preceded by another one which contains very detailed description on why exactly the validation fails.
I got a similar issue, it ended up to be this parameter
Hop this helps!
André Arnaud de Cal...
292,031
Super User 2025 Season 1
Martin Dráb
230,868
Most Valuable Professional
nmaenpaa
101,156