I am configuring Commerce on a standalone 10.0.41 and I can activate the Store Commerce POS, but not the web version.
I can confirm this by looking at the values in the ax.RETAILIDENTITYPROVIDER, ax.RETAILRELYINGPARTY and ax.RETAILSERVERRESOURCE in the RetailChannelDatabase database.
I see the following in Event Viewer
Provided audience 'api://<My client Id>' found within the token does not match any of the acceptable audiences 'https://commerce.dynamics.com' configured for the the issuer 'https://sts.windows.net/<My tenant Id>/'. This can be configured in the headquarter under Retail Shared Parameters->Identity Providers following by the job 1110 execution. Once the job completes it will take 5 minutes for Retail Server to detect the change.
The acceptable audience
ttps://commerce.dynamics.com referred to in the error log is coming from the Microsoft.Dynamics.Retail.RetailServer.AspNetCore.dll.config (under C:\Program Files\Microsoft Dynamics 365\10.0\Commerce Scale Unit\Microsoft\RetailServer\bin\) on my VHD.
<add key="AADRetailServicePrincipalName" value="https://commerce.dynamics.com" />
I can confirm this by renaming it and seeing the change in the Event Viewer message.
It doesn't seem to be validating it against any of the retail server resources I have configured in Retail Shared Parameters (i.e. those in the RetailChannelDatabase database)
I also had to manually add my relyingParty to the config as below to get this far:
<identityProviders>
<identityProvider name="Commerce Identity Provider" providerType="OpenIdConnect" issuer="(DefaultCommerceIssuer)">
<relyingParties>
<relyingParty clientId="Cloud POS" clientType="Public" userType="Worker" />
<relyingParty clientId="Modern POS" clientType="Public" userType="Worker" />
</relyingParties>
</identityProvider>
<identityProvider name="Azure AD" providerType="AzureActiveDirectory" issuer="(DefaultAadIssuer)">
<relyingParties>
<relyingParty clientId="d5527362-3bc8-4e63-b5b3-606dc14747e9" clientType="Public" userType="Worker" />
<relyingParty clientId="d6b5a0bd-bf3f-4a8c-b370-619fb3d0e1cc" clientType="Public" userType="Worker" />
<relyingParty clientId="<My client Id>" clientType="Public" userType="Worker" />
</relyingParties>
</identityProvider>
</identityProviders>
Am I supposed to manually update this configuration file, or is the distribution scheduler supposed to do this?
I think I have gone wrong somewhere!
Perhaps it just doesn't work as I don't have a licence attached to the tenancy I am using with my VHD.