SBX - Search With Button

SBX - Forum Post Title

Retail - service to service authentication error

Microsoft Dynamics AX Forum

J.Lo asked a question on 9 May 2017 3:25 AM

Question Status

Unanswered

On our project we have run into an issue while trying to authenticate against the retail server through an api. we are following the guide as specified here : https://community.dynamics.com/ax/b/axforretail/archive/2016/09/24/support-for-service-to-service-authentication-in-retail-server

Note: the anonymous approach works successfully but only for certain operations. however you need to authenticate as soon as you need to query a customer or sales order. Hence the guide above.

Note: there is just one azure tenant and one active directory

Unfortunately, we run into the following error (we have checked our configurations / settings value numerous times and confirmed they are correct). Interestingly if we run the code in the sdk (Storefront.Publishing.csproj) in the virtual machine we receive the same error.

The service is not provisioned for the same tenant. User / Application is hitting a retail server that does not belong to the same tenant as the user / application’s account;\r\n- The AAD environment of the user / application logging in is different than the AAD environment for which this service instance is configured.E.g.AAD Production users can only use Retail Server instances configured for Production;"} System.Exception {Microsoft.Dynamics.Commerce.RetailProxy.UserAuthenticationException}

Note: the source of the error is microsoft.odata.client : Microsoft_Dynamics_Commerce_Runtime_InvalidIssuer


It would be greatly appreciated! If anyone can shed some light on how to resolve this error?

Reply
Sergey Pikhulya responded on 16 Jun 2017 2:54 AM
My Badges

Looking at the error you are having I believe you have deployed AX/RS into TenantA but while trying to authenticate to RS on behalf of application you are using TenantB. Please make sure that you are using the same tenant (the one which is associated with your AX) while acquiring token from AAD.

Reply
Anders_Dahlin responded on 17 May 2019 8:43 AM

Did you find a solution, what was the error?

Reply

SBX - Two Col Forum

SBX - Migrated JS