web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

No record found.

News and Announcements icon
Community site session details

Community site session details

Session Id :
Dynamics 365 Community / Forums / Commerce forum / Audience Validation Fa...
Commerce forum

Audience Validation Failed

(0) ShareShare
ReportReport
Posted on by 35

Getting below error while activating Cloud POS in D365.

6457.jpg

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 have the same question (0)
  • Suggested answer
    Ahmad Zbeeb Profile Picture
    150 on at

    I got a similar issue, it ended up to be this parameter

    6813.2019_2D00_02_2D00_06_5F00_19_2D00_33_2D00_25.png

    Hop this helps!

  • SergeyP Profile Picture
    2,928 on at

    This warning in Retail Server log is followed/preceded by another one which contains very detailed description on why exactly the validation fails.

  • Chi-chi Profile Picture
    10 on at

    Have you fix this error already?

  • Vysakh Profile Picture
    137 on at

    Can you re-post the parameter? It is not visible on this page now.

  • Ulrich Kallmann Profile Picture
    5 on at

    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

  • SergeyP Profile Picture
    2,928 on at

    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.

  • mariya11 Profile Picture
    55 on at

    Hi Have you resolved this issue?

  • mariya11 Profile Picture
    55 on at

    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.

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

November Spotlight Star - Khushbu Rajvi

Congratulations to a top community star!

Forum Structure Changes Coming on 11/8!

In our never-ending quest to help the Dynamics 365 Community members get answers faster …

Dynamics 365 Community Platform update – Oct 28

Welcome to the next edition of the Community Platform Update. This is a status …

Leaderboard > Commerce

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans