Skip to content
Discussion options

You must be logged in to vote

So after some playing around with PowerShell, Invoke-RestMethod and slamming my head into the desk with the Authentik documentation, I have made a discovery. You can programmatically access and authenticate a user via Authentik, it takes some doing and has some caveats.

You first need to create a simple authentication flow that asks for the username on page 1 and then the password on page 2. Like the following:

Then in PowerShell but this also applies to other scripting/programming languages, you first need to do the following:

$Response1 = Invoke-RestMethod `
    -URI "https://authentik.domain.com/api/v3/flows/executor/signin-legacy/" `
    -FollowRelLink `
    -SessionVariable Authentik 

Replies: 2 comments

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Answer selected by SirWobbyTheFirst
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
1 participant