Impossible to enable an API

Document ID : KB000105738
Last Modified Date : 09/07/2018
Show Technical Document Details
Issue:
Have a problem on enabling an API and about the number of Applications.

Cannot enable a new API (synced new from the Gateway) because the EULA field is disabled.

From the APIs list it seems that it is associated with 2 Applications .. but it's not, it's new .. also  there're many API with a false number of associated Applications when we have only 2 defined applications.
Environment:
CA API Developer Portal - 4.2.3 , 4.2.5.
Cause:
Due to having more than 1 tenant active and the Gateway policy "Set as Portal Managed Service" is using the same uuid across all the tenants the Portal was falsely connecting them to the wrong tenant.
Due to this mismatch an upgrade will not resolve the issue as the DB contents are not correct.
Resolution:
The problem is caused due to bad DB contents from a previous release.
The client will need to upgrade to 4.2.7.1 and also remove the old entries and re-import them into the Portal to resolve the issue.