Skip to main content

Notifications

Announcements

No record found.

Dynamics 365 Community / Forums / Commerce forum / Audience Validation Fa...
Commerce forum

Audience Validation Failed

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

  • mariya11 Profile Picture
    mariya11 55 on at
    RE: Audience Validation Failed

    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.

  • mariya11 Profile Picture
    mariya11 55 on at
    RE: Audience Validation Failed

    Hi Have you resolved this issue?

  • SergeyP Profile Picture
    SergeyP 2,928 on at
    RE: Audience Validation Failed

    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.

  • Ulrich Kallmann Profile Picture
    Ulrich Kallmann 5 on at
    RE: Audience Validation Failed

    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

  • Vysakh Profile Picture
    Vysakh 135 on at
    RE: Audience Validation Failed

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

  • Chi-chi Profile Picture
    Chi-chi 10 on at
    RE: Audience Validation Failed

    Have you fix this error already?

  • SergeyP Profile Picture
    SergeyP 2,928 on at
    RE: Audience Validation Failed

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

  • Suggested answer
    Ahmad Zbeeb Profile Picture
    Ahmad Zbeeb 150 on at
    RE: Audience Validation Failed

    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!

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

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 291,280 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 230,214 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans