We are currently working on integrating our application with JIRA Server, and for this purpose, we are using the client credential method.
To achieve this integration, we have created an OAuth 2.0 integration app, which allows us to generate an access token through the following request:

With the access token obtained from the response, we then proceed to request the cloud id using the following request:
The issue we are facing is that this request is returning a blank response "[]", and we are unable to fetch the cloud id.
However, when we attempt to generate the access token using the "three-legged OAuth" or "authorization code grants," and then use this token in the same request as mentioned above, we successfully obtain a cloud id.
In summary, the problem lies in the client credential method, as it does not return the cloud id as expected, whereas using "three-legged OAuth" or "authorization code grants" does give us the desired cloud id.