As you attempt to encode an outgoing B2B message with Logic Apps, you sometimes get a 400 Bad Request response with the error message:
Message cannot be serialized since the schema http://Contoso.X12810.MSLI.Schemas.AP.X1200401810#X12_00401_810 could not be located. Either the schema is not deployed or multiple copies are deployed.
Which we are improving for cases that there is no schema reference to:
Message cannot be serialized since the schema 'http://Contoso.X12810.MSLI.Schemas.AP.X1200401810#X12_00401_810' could not be located. Schema reference could not be found in the agreement send settings.
Especially if you edit the agreement settings in the raw JSON view, it is easy to mistakenly add the schema references in the agreement receive settings because the structure of receive and send are identical (the hierarchy is not).
Now you may have a schema reference in the proper send settings location of the agreement, and indeed that schema is not present at the given address, in which case we are improving the error message to:
Message cannot be serialized since the schema 'http://Contoso.X12810.MSLI.Schemas.AP.X1200401810#X12_00401_810' could not be located at 'foobar'. Either the schema is not deployed or multiple copies are deployed.
This may happen if the schema is deleted from the integration account by accident after the reference is added in the agreement. Removal of a schema or other artifact in the integration account will not remove the reference agreements or other artifacts have to the schema or other removed artifact. When you remove an artifact, it is your responsibility to ensure no reference to it remain. It case you get the message above, there is remaining processing in your integration solution that depend on the schema and you likely should upload it again to the integration account.