Hi,
Thank you for posting your query.
Kindly follow the steps provided below to resolve your issue.
Configuration Manager uses the administration service REST API in several native scenarios. You can also use the administration service for your own custom scenarios.
Note
The examples in this article all use the FQDN of the server that hosts the SMS Provider role. If you access the administration service remotely through a CMG, use the CMG endpoint instead of the SMS Provider FQDN. For more information, see Enable internet access
Go to this link for your reference and other troubleshooting procedures https://learn.microsoft.com/en-us/mem/configmgr/develop/adminservice/usage
Do not hesitate to message us if you need further assistance.
If the answer is helpful kindly click "Accept as Answer" and up vote it.