Guten Tag everybody,
I had the same issue with Exchange rejecting sideloading. The error I received was:
-Error sideloading!-- Error: Command failed: npx @microsoft/teamsapp-cli install --xml-path (×) Error: M365.PackageServiceError: Request failed with status code 400 (tracingId:...) BadRequest: Sideloading rejected by Exchange
In my case the issue was caused by the closing curly brace } in some URLs, which invalidated the manifest.
I ran npm run validate to check the manifest and found the following errors:
Error #1: XML Schema Validation Error: The 'DefaultValue' attribute is invalid. The value 'https://localhost:3000}assets/icon-16.png' is not a valid URL.
Error #2: XML Schema Violation: The manifest does not adhere to the required XML schema definitions.
After correcting the issue, the validation result showed: The manifest is valid.
This resolved the sideloading issue, and I was able to proceed successfully.