This is a summary of the flows and examples using curl.
Just to be clear, an IDP is an Identity Provider.
This applies to ADFS 4.0 (Server 2016) and upwards.