Hi, @Slava G
Great to know that the issue has already been resolved and thanks for sharing the solution so that others experiencing the same thing can easily reference this! Since the Microsoft Q&A community has a policy that "The question author cannot accept their own answer. They can only accept answers by others", I'll repost your solution in case you'd like to "[Accept]" the answer : )
Issue Symptom:
Encountering an error when trying to run the Get-RemoteDomain cmdlet: "The term 'Get-RemoteDomain' is not recognized as the name of a cmdlet."
When making an HTTPS request (in postman) for Get-RemoteDomain, the response is: "cmdlet Get-RemoteDomain is not present in the role definition of the current user."
Resolution:
A new service body with the same ID as the installed application object needs to be created before the missing role can be assigned.