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

Community site session details

Session Id :
Supply chain | Supply Chain Management, Commerce
Suggested answer

Api of Commerce Error

(0) ShareShare
ReportReport
Posted on by 6
Categories:
I have the same question (0)
  • Suggested answer
    DAnny3211 Profile Picture
    10,787 Moderator on at
    Api of Commerce Error

    Hi,

     

    The error you're encountering—UserAuthenticationException with the message “MicrosoftDynamicsCommerceRuntimeInvalidAudience”—indicates a misconfiguration in the identity provider setup for Microsoft Dynamics 365 Commerce.

     

    What This Means

     

    The system is unable to validate the audience claim in the authentication token, which is essential for secure communication between services. This typically happens when:

     

    • The relying party configuration is incorrect.

    • The server resource ID does not match the expected value.

    • The identity provider (e.g., Microsoft Entra ID) is not properly set up in Retail Headquarters.


    •  
     

    Recommended Actions

     

    1. Verify Identity Provider Setup:

       

      • Go to Retail Headquarters > Identity Providers.

      • Ensure that the audience URI and resource ID match the values expected by the Commerce Runtime.

    2. Check Relying Party Configuration:

       

      • If you're using Personnel ID and Password logon, confirm that the relying party trust is correctly configured in AD FS or your identity provider.

    3. Microsoft Entra ID Logon:

       

      • Ensure that both the relying party and server resource IDs are correctly registered in Azure AD.

      • Validate that the app registration includes the correct redirect URIs and API permissions.

    4. Review Token Claims:

       

      • Use tools like JWT.io to inspect the token and confirm that the audience claim matches the expected value.

    5. Consult Documentation or Support:

       

      • Refer to Microsoft’s official documentation on Commerce Runtime authentication.

      • If the issue persists, consider raising a support ticket with Microsoft for deeper investigation.


    6.  
     

    Thanks and best regards,

    Daniele

    Note: This response was prepared with support from Copilot to ensure clarity and completeness.

  • S Gopi Krishna Profile Picture
    564 on at
    Api of Commerce Error
    It seems that this issue is related to authentication, and the error message you are encountering is different from the previous one. Additionally, it would be helpful if you could share which endpoint you are trying to call to get this error message.
  • Suggested answer
    DAnny3211 Profile Picture
    10,787 Moderator on at
    Api of Commerce Error

    Hi,

    Thank you for sharing the error details. The message you're encountering—Microsoft_Dynamics_Commerce_Runtime_InvalidAudience—suggests that the authentication process is failing due to incorrect audience validation.

    Here are a few steps you can take to resolve this:

    • If you're using Personnel ID and Password for logon, ensure that the relying parties are correctly configured in Retail Headquarters.
    • If you're using Microsoft Entra ID (formerly Azure AD), verify that both the relying parties and the server resources are properly set up to match the expected audience values.
    • Double-check the identity provider settings and confirm that the audience URI matches what is expected by the Commerce Runtime.

    This type of error often occurs when the token presented during authentication does not match the expected configuration, so reviewing the setup in Retail Headquarters is key.

    Please verify if this response was helpful.

    Thanks and best regards,
    Daniele
    Note: This response was prepared with support from Copilot to ensure clarity and completeness.

  • AA-03061107-0 Profile Picture
    6 on at
    Api of Commerce Error
    i followed all the steps what can i do ?
  • S Gopi Krishna Profile Picture
    564 on at
    Api of Commerce Error
    Hello, I would suggest you to try the exact steps mentioned in the following linked in article How to consume Dynamics 365 Commerce APIs through Postman
  • AA-03061107-0 Profile Picture
    6 on at
    Api of Commerce Error
    I have tried several times to access standard end points of store commerce Dyn365 F&O and I followed documentation of Microsoft to create Client ID this is the reference Consume Retail Server APIs in external applications - Commerce | Dynamics 365 | Microsoft Learn
    I don't know the problem now, what else do I need to configure in HQ or Entra ID so that my Retail Server endpoint accepts the token?
    Am I missing a step, job, or special configuration for Scale Unit VMs?  

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

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Mansi Soni – Community Spotlight

We are honored to recognize Mansi Soni as our August 2025 Community…

Congratulations to the July Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Supply chain | Supply Chain Management, Commerce

#1
Mohamed Amine Mahmoudi Profile Picture

Mohamed Amine Mahmoudi 577 Super User 2025 Season 2

#2
Laurens vd Tang Profile Picture

Laurens vd Tang 379 Super User 2025 Season 2

#3
Abhilash Warrier Profile Picture

Abhilash Warrier 300 Super User 2025 Season 2

Featured topics

Product updates

Dynamics 365 release plans