D365FO SSRS Report Query field listing error : Exception occurred on the metadata service on client or server – error: forbidden

You get : Exception occurred on the metadata service on client or server – error: forbidden error while trying to add fields from a query on SSRS report.

Check for the “OfflineAuthenticationAdminEmail”  key in file “DynamicsDevConfig” in AOSService -> PackagesLocalDirectory->Bin to be set to  the correct login email that you are using.

There are workarounds for this. But in my case the solution was completely different.

You can look at :

https://community.dynamics.com/365/financeandoperations/b/365foandaxtechnicalworld/posts/offline-authentication-admin-email-d365fo

or

https://community.dynamics.com/365/financeandoperations/f/dynamics-365-for-finance-and-operations-forum/238174/exception-occurred-on-the-metadata-service-on-client-or-server—error

At last I found the solution by changing K:\AosService\WebRoot\web.config file Provisioning.AdminPrincipalName key value to my e-mail address.

D365FO changes DynamicsDevConfig file OfflineAuthenticationAdminEmail key with this value.

Hope it helps on your case.

Don’t forget to restart IIS / IISexpress and Visual Studio after changing value. 

Leave a Reply

Your email address will not be published. Required fields are marked *