FusionAuth
    • Home
    • Categories
    • Recent
    • Popular
    • Pricing
    • Contact us
    • Docs
    • Login
    1. Home
    2. akoskm
    3. Best
    A
    • Profile
    • Following 0
    • Followers 0
    • Topics 1
    • Posts 6
    • Best 1
    • Controversial 0
    • Groups 0

    Best posts made by akoskm

    • Create user with FusionAuth Admin Interface from Kickstartfile

      Hi!

      Is it possible to create an admin account with FusionAuth Admin Interface access from the Kickstart file.

      Here's my kickstart file:

      {
        "variables": {
          "adminEmail": "cypress@example.com",
          "user1Email": "rob@example.com",
          "password": "hello123",
          "defaultTenantId": "30663132-6464-6665-3032-326466613934"
        },
        "apiKeys": [
          {
            "key": "#{ENV.FUSION_AUTH_API_KEY}",
            "description": "Standard development API key"
          }
        ],
        "supportId": "5acfd1b6-f687-ae13-8ffd-1900200c9a77",
        "requests": [
          {
            "method": "POST",
            "url": "/api/application/#{ENV.SECRET_FUSIONAUTH_CLIENT_ID}",
            "body": {
              "application": {
                "name": "Project Secret",
                "oauthConfiguration": {
                  "clientSecret": "#{ENV.SECRET_FUSIONAUTH_CLIENT_SECRET}"
                },
                "roles": ["user", "admin"]
              }
            }
          },
          {
            "method": "POST",
            "url": "/api/user/registration/ace26aa5-0fe9-4672-bc5f-dfe198f4955d",
            "body": {
              "user": {
                "email": "#{adminEmail}",
                "password": "#{password}"
              },
              "registration": {
                "applicationId": "#{ENV.SECRET_FUSIONAUTH_CLIENT_ID}",
                "roles": ["user", "admin"]
              }
            }
          },
        ]
      }
      
      

      My understanding was that it should be enough to add the "admin" role to the user to be able to access the admin interface.

      However, when I try to log in with cypress@example.com:hello123 - a user with the "admin" role - I'm getting this screen:

      f97571bb-fd40-448b-8f47-bde50f4f6c0b-image.png

      Thanks!

      posted in Q&A
      A
      akoskm