When those two don't match, the reason is generally that the SP is forcing a Format via NameIDPolicy. That's the only functional difference between the two seqeuences, you don't have a request in the command line case. -- Scott