You are experiencing an issue with the DNN logs error 'Error occurred while obtaining a token for portalId 0 and application Analytics'. This problem might arise after the addition of Google Analytics in your DNN instance. The error logs indicate that the instance has already been registered, which is likely causing the problem. "The instance <instance-ID>has already been registered"
The solution to this issue involves unregistering the instance from the DNN side and checking the tenant ID for both servers. Here are the steps:
- Contact DNN Support to unregister the instance causing the error. This needs to be done by the DNN Infrastructure Team.
- If you have two server (Production and Development) please make sure that both server have different instance-ID's. You can find your Microservices Tenant ID by following Finding your Microservices Tenant ID.
- If the tenant IDs are the same, the quickest fix would be to change the name of the database in the Development server. This will change your connection string and the tenant ID there.
- Please share the Tenant-ID of the affected server with Support so that we can unregister the instance from our side.
This article provides a solution to the DNN error 'Error occurred while obtaining a token for portalId 0 and application Analytics'. The solution involves unregistering the instance from the DNN side, checking the tenant ID for both servers, and changing the database name in the DEV server if necessary.