Programmatic Authentication

I’m trying to use a machine user to perform some automated tests going through my Okta auth.
I have a federated organzation where my application is hosted. My account however is provided through an external IDP (another okta organization)

I tried this: Authentication | Okta Developer
But the audience field is deprecated.

How can I use the API properly to go through a idp routed federation org (where the application is), with my account that is in the idp org?

Hello Simon,

Below is a sample that shows how to do an automated PKCE login flow. This should give a foundation of the setup for a single Org and could be modified to handle and external Org that acts as the IdP.