@jhnc hit the point, this is the basic problem
Direct solution to the problem:
username=$1 curl -k "https://test01.foo.com:4487/profile/admin/test?requester=https://saml.example.org&principal=$username&saml2"