When Configuring Partnership and especially with EntityID (IdPID and SPID), a URL can be used as per documentation. When using special chars like "&", it is failing.
To illustrate, configuring the SPID format like:
https://sp.example.com/url.jsp?key=<key>&field=<name>&type=3
is failing.
Indeed, the Federation services fail to retrieve the Servide Provider ID until https://sp.example.com/url.jsp?key=<key>.
Don't use the "&" in the SPID, as it is a special character part of a query string like "?".
Because the ampersand character "&" in the EntityID query string will be recognized as a separate query parameter.
The below Reference URL is more appropriate (1), which states:
Recommended EntityID would be:
https://idp.example.com/idp
https://sp.example.com/sp
Invalid EntityID would be:
http://idp.example.com/affwebservices/public/saml2sso?SPID=http://sp.example.org?key=<key>&test=1
http://idp.example.com/affwebservices/public/saml2sso?SPID=http://sp.example.org?key=<key> (may work but not advisable to use)