Setting up SSO using Active Directory programmatically using API

I need to configure SSO on rancher and since rancher is creating using a pipeline I need to do that programmatically using some kind of API.
In the documentation I can see the steps but only for using web UI.

Can you please help me ? THank you