Create authentication flow with authenticationExecutions through REST api

933 views
Skip to first unread message

Lars Van Casteren

unread,
Apr 17, 2021, 7:17:27 AM4/17/21
to Keycloak User
I'm a bit stuck at creating an authentication flow through the REST api (basically https://www.keycloak.org/docs/latest/server_admin/index.html#automatically-link-existing-first-login-flow). 

Creating the flow & executions manually works perfectly, but when I execute via REST api like this:

POST /{realm}/authentication/flows

{
    "alias": "Auto-Link",
    "description": "",
    "providerId": "basic-flow",
    "topLevel": true,
    "builtIn": false,
    "authenticationExecutions": [
        {
            "authenticator": "idp-create-user-if-unique",
            "requirement": "ALTERNATIVE",
            "priority": 0,
            "userSetupAllowed": false,
            "autheticatorFlow": false
        },
        {
            "authenticator": "idp-auto-link",
            "requirement": "ALTERNATIVE",
            "priority": 1,
            "userSetupAllowed": false,
            "autheticatorFlow": false
        }
    ]
}

It does create the flow, but not the included authenticationExecutions.
How should I create the authenticationExecutions?

Thanks!
L

Lars Van Casteren

unread,
Apr 17, 2021, 8:17:36 AM4/17/21
to Keycloak User

Another message on this list mentioned checking the browser developer console when adding executions to flows to see what calls are being made.

Doing just that fixed my problem:

 

Create the flow

Add authenticationExecutions

Get the ID’s

Update the authenticationExecutions

 

 

Gr,

L

--
You received this message because you are subscribed to a topic in the Google Groups "Keycloak User" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/keycloak-user/qdIUW0-P0Y8/unsubscribe.
To unsubscribe from this group and all its topics, send an email to keycloak-use...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/keycloak-user/d7e6854a-3d57-47c5-af18-f0b48e2438a0n%40googlegroups.com.

Reply all
Reply to author
Forward
0 new messages