I dont know how to do API calls to the LCS environment.
For the D365FO tool, I keep getting this error message,
[08:56:54][<Unknown>] Unable to locate the %ServiceDrive% environment variable. It could indicate that the machine is either not configured with D365FO or that you have domain joined a local Ti
er1. We have defaulted to c:\
[08:56:54][<Unknown>] This message will show every time you load the module. If you want to silence this message, please add the ServiceDrive environment variable by executing this command (rem
ember to restart the console afterwards):
[Environment]::SetEnvironmentVariable("ServiceDrive", "C:", "Machine")
[08:56:55][Invoke-Authorization] Something went wrong while working against Azure Active Directory (AAD) | The remote server returned an error: (400) Bad Request.
WARNING: [08:56:55][Invoke-Authorization] Stopping because of errors