I think this error message is a little misleading. Can we just throw the exception 3 times from each of the above if conditions? That way you can specifically say SPProviderID (or NameQualifier, or SPNameQualifier) cannot be present if issuer format is entity.