We have SCOM 2019 UR2 on all servers.
On log file i find :
WorkspaceId does not match the expected value.
ATPHandler: Mma Agent is not onboarded to the intended Workspace. The device needs to be offboarded before onboarding to a different Workspace.
When I put id and key to SCOM agent it connect and work:
I have exactly the same problem, it seems to me that the implementation in SCCM is half-baked.
I will report it via the "send a smile/frown" option and will open a support case also at Microsoft.
The error is ridiculously vague.