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 :
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.