published on Saturday, Nov 21, 2026 by Pulumi
published on Saturday, Nov 21, 2026 by Pulumi
Allows you to manage a fine-grained admin permission for Keycloak organizations.
This resource requires Fine-Grained Admin Permissions v2 (admin-fine-grained-authz:v2) and Keycloak 26.7 or later, the first version whose admin permissions cover organizations. The realm needs organizations enabled (organizationsEnabled = true). See the docker-compose.yml for an example of how to enable this feature.
Each instance of this resource represents one permission in Keycloak. A single permission can span both scopes, target multiple specific organizations, and reference multiple policies.
When adminPermissionsEnabled = true is set on the realm, Keycloak automatically creates an admin-permissions client that serves as the authorization resource server for all FGAPv2 admin permissions.
Available scopes:
view— view the organization; also what makes organizations appear in queriesmanage— manage the organization, including updating and deleting it
Creating organizations requires manage on all organizations (a permission without organizationIds), not only on specific ones.
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as keycloak from "@pulumi/keycloak";
const realm = new keycloak.Realm("realm", {
realm: "my-realm",
organizationsEnabled: true,
adminPermissionsEnabled: true,
});
const adminPermissions = keycloak.openid.getClientOutput({
realmId: realm.id,
clientId: "admin-permissions",
});
const orgAdmins = new keycloak.Group("org_admins", {
realmId: realm.id,
name: "org-admins",
});
const acme = new keycloak.Organization("acme", {
realm: realm.id,
name: "acme",
domains: [{
name: "acme.example.com",
}],
});
const orgAdminsPolicy = new keycloak.openid.ClientGroupPolicy("org_admins_policy", {
realmId: realm.id,
resourceServerId: adminPermissions.id,
name: "org-admins-policy",
groups: [{
id: orgAdmins.id,
path: orgAdmins.path,
extendChildren: false,
}],
logic: "POSITIVE",
decisionStrategy: "UNANIMOUS",
});
// Permission targeting a specific organization.
const orgAdminsManageAcme = new keycloak.OrganizationAdminPermissions("org_admins_manage_acme", {
realmId: realm.id,
name: "org-admins-manage-acme",
description: "Org admins can view and manage acme",
decisionStrategy: "UNANIMOUS",
organizationIds: [acme.id],
scopes: [
"view",
"manage",
],
policies: [orgAdminsPolicy.id],
});
// Permission targeting ALL organizations in the realm (organization_ids omitted).
const orgAdminsViewAllOrganizations = new keycloak.OrganizationAdminPermissions("org_admins_view_all_organizations", {
realmId: realm.id,
name: "org-admins-can-view-all-organizations",
scopes: ["view"],
policies: [orgAdminsPolicy.id],
});
import pulumi
import pulumi_keycloak as keycloak
realm = keycloak.Realm("realm",
realm="my-realm",
organizations_enabled=True,
admin_permissions_enabled=True)
admin_permissions = keycloak.openid.get_client_output(realm_id=realm.id,
client_id="admin-permissions")
org_admins = keycloak.Group("org_admins",
realm_id=realm.id,
name="org-admins")
acme = keycloak.Organization("acme",
realm=realm.id,
name="acme",
domains=[{
"name": "acme.example.com",
}])
org_admins_policy = keycloak.openid.ClientGroupPolicy("org_admins_policy",
realm_id=realm.id,
resource_server_id=admin_permissions.id,
name="org-admins-policy",
groups=[{
"id": org_admins.id,
"path": org_admins.path,
"extend_children": False,
}],
logic="POSITIVE",
decision_strategy="UNANIMOUS")
# Permission targeting a specific organization.
org_admins_manage_acme = keycloak.OrganizationAdminPermissions("org_admins_manage_acme",
realm_id=realm.id,
name="org-admins-manage-acme",
description="Org admins can view and manage acme",
decision_strategy="UNANIMOUS",
organization_ids=[acme.id],
scopes=[
"view",
"manage",
],
policies=[org_admins_policy.id])
# Permission targeting ALL organizations in the realm (organization_ids omitted).
org_admins_view_all_organizations = keycloak.OrganizationAdminPermissions("org_admins_view_all_organizations",
realm_id=realm.id,
name="org-admins-can-view-all-organizations",
scopes=["view"],
policies=[org_admins_policy.id])
package main
import (
"github.com/pulumi/pulumi-keycloak/sdk/v6/go/keycloak"
"github.com/pulumi/pulumi-keycloak/sdk/v6/go/keycloak/openid"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
realm, err := keycloak.NewRealm(ctx, "realm", &keycloak.RealmArgs{
Realm: pulumi.String("my-realm"),
OrganizationsEnabled: pulumi.Bool(true),
AdminPermissionsEnabled: pulumi.Bool(true),
})
if err != nil {
return err
}
adminPermissions := openid.LookupClientOutput(ctx, openid.GetClientOutputArgs{
RealmId: realm.ID(),
ClientId: pulumi.String("admin-permissions"),
}, nil)
orgAdmins, err := keycloak.NewGroup(ctx, "org_admins", &keycloak.GroupArgs{
RealmId: realm.ID(),
Name: pulumi.String("org-admins"),
})
if err != nil {
return err
}
acme, err := keycloak.NewOrganization(ctx, "acme", &keycloak.OrganizationArgs{
Realm: realm.ID(),
Name: pulumi.String("acme"),
Domains: keycloak.OrganizationDomainArray{
&keycloak.OrganizationDomainArgs{
Name: pulumi.String("acme.example.com"),
},
},
})
if err != nil {
return err
}
orgAdminsPolicy, err := openid.NewClientGroupPolicy(ctx, "org_admins_policy", &openid.ClientGroupPolicyArgs{
RealmId: realm.ID(),
ResourceServerId: adminPermissions.Id(),
Name: pulumi.String("org-admins-policy"),
Groups: openid.ClientGroupPolicyGroupArray{
&openid.ClientGroupPolicyGroupArgs{
Id: orgAdmins.ID(),
Path: orgAdmins.Path,
ExtendChildren: pulumi.Bool(false),
},
},
Logic: pulumi.String("POSITIVE"),
DecisionStrategy: pulumi.String("UNANIMOUS"),
})
if err != nil {
return err
}
// Permission targeting a specific organization.
_, err = keycloak.NewOrganizationAdminPermissions(ctx, "org_admins_manage_acme", &keycloak.OrganizationAdminPermissionsArgs{
RealmId: realm.ID(),
Name: pulumi.String("org-admins-manage-acme"),
Description: pulumi.String("Org admins can view and manage acme"),
DecisionStrategy: pulumi.String("UNANIMOUS"),
OrganizationIds: pulumi.StringArray{
acme.ID(),
},
Scopes: pulumi.StringArray{
pulumi.String("view"),
pulumi.String("manage"),
},
Policies: pulumi.StringArray{
orgAdminsPolicy.ID(),
},
})
if err != nil {
return err
}
// Permission targeting ALL organizations in the realm (organization_ids omitted).
_, err = keycloak.NewOrganizationAdminPermissions(ctx, "org_admins_view_all_organizations", &keycloak.OrganizationAdminPermissionsArgs{
RealmId: realm.ID(),
Name: pulumi.String("org-admins-can-view-all-organizations"),
Scopes: pulumi.StringArray{
pulumi.String("view"),
},
Policies: pulumi.StringArray{
orgAdminsPolicy.ID(),
},
})
if err != nil {
return err
}
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Keycloak = Pulumi.Keycloak;
return await Deployment.RunAsync(() =>
{
var realm = new Keycloak.Realm("realm", new()
{
RealmName = "my-realm",
OrganizationsEnabled = true,
AdminPermissionsEnabled = true,
});
var adminPermissions = Keycloak.OpenId.GetClient.Invoke(new()
{
RealmId = realm.Id,
ClientId = "admin-permissions",
});
var orgAdmins = new Keycloak.Group("org_admins", new()
{
RealmId = realm.Id,
Name = "org-admins",
});
var acme = new Keycloak.Organization("acme", new()
{
Realm = realm.Id,
Name = "acme",
Domains = new[]
{
new Keycloak.Inputs.OrganizationDomainArgs
{
Name = "acme.example.com",
},
},
});
var orgAdminsPolicy = new Keycloak.OpenId.ClientGroupPolicy("org_admins_policy", new()
{
RealmId = realm.Id,
ResourceServerId = adminPermissions.Apply(getClientResult => getClientResult.Id),
Name = "org-admins-policy",
Groups = new[]
{
new Keycloak.OpenId.Inputs.ClientGroupPolicyGroupArgs
{
Id = orgAdmins.Id,
Path = orgAdmins.Path,
ExtendChildren = false,
},
},
Logic = "POSITIVE",
DecisionStrategy = "UNANIMOUS",
});
// Permission targeting a specific organization.
var orgAdminsManageAcme = new Keycloak.OrganizationAdminPermissions("org_admins_manage_acme", new()
{
RealmId = realm.Id,
Name = "org-admins-manage-acme",
Description = "Org admins can view and manage acme",
DecisionStrategy = "UNANIMOUS",
OrganizationIds = new[]
{
acme.Id,
},
Scopes = new[]
{
"view",
"manage",
},
Policies = new[]
{
orgAdminsPolicy.Id,
},
});
// Permission targeting ALL organizations in the realm (organization_ids omitted).
var orgAdminsViewAllOrganizations = new Keycloak.OrganizationAdminPermissions("org_admins_view_all_organizations", new()
{
RealmId = realm.Id,
Name = "org-admins-can-view-all-organizations",
Scopes = new[]
{
"view",
},
Policies = new[]
{
orgAdminsPolicy.Id,
},
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.keycloak.Realm;
import com.pulumi.keycloak.RealmArgs;
import com.pulumi.keycloak.openid.OpenidFunctions;
import com.pulumi.keycloak.openid.inputs.GetClientArgs;
import com.pulumi.keycloak.Group;
import com.pulumi.keycloak.GroupArgs;
import com.pulumi.keycloak.Organization;
import com.pulumi.keycloak.OrganizationArgs;
import com.pulumi.keycloak.inputs.OrganizationDomainArgs;
import com.pulumi.keycloak.openid.ClientGroupPolicy;
import com.pulumi.keycloak.openid.ClientGroupPolicyArgs;
import com.pulumi.keycloak.openid.inputs.ClientGroupPolicyGroupArgs;
import com.pulumi.keycloak.OrganizationAdminPermissions;
import com.pulumi.keycloak.OrganizationAdminPermissionsArgs;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Map;
import java.io.File;
import java.nio.file.Files;
import java.nio.file.Paths;
public class App {
public static void main(String[] args) {
Pulumi.run(App::stack);
}
public static void stack(Context ctx) {
var realm = new Realm("realm", RealmArgs.builder()
.realm("my-realm")
.organizationsEnabled(true)
.adminPermissionsEnabled(true)
.build());
final var adminPermissions = OpenidFunctions.getClient(GetClientArgs.builder()
.realmId(realm.id())
.clientId("admin-permissions")
.build());
var orgAdmins = new Group("orgAdmins", GroupArgs.builder()
.realmId(realm.id())
.name("org-admins")
.build());
var acme = new Organization("acme", OrganizationArgs.builder()
.realm(realm.id())
.name("acme")
.domains(OrganizationDomainArgs.builder()
.name("acme.example.com")
.build())
.build());
var orgAdminsPolicy = new ClientGroupPolicy("orgAdminsPolicy", ClientGroupPolicyArgs.builder()
.realmId(realm.id())
.resourceServerId(adminPermissions.applyValue(_adminPermissions -> _adminPermissions.id()))
.name("org-admins-policy")
.groups(ClientGroupPolicyGroupArgs.builder()
.id(orgAdmins.id())
.path(orgAdmins.path())
.extendChildren(false)
.build())
.logic("POSITIVE")
.decisionStrategy("UNANIMOUS")
.build());
// Permission targeting a specific organization.
var orgAdminsManageAcme = new OrganizationAdminPermissions("orgAdminsManageAcme", OrganizationAdminPermissionsArgs.builder()
.realmId(realm.id())
.name("org-admins-manage-acme")
.description("Org admins can view and manage acme")
.decisionStrategy("UNANIMOUS")
.organizationIds(acme.id())
.scopes(
"view",
"manage")
.policies(orgAdminsPolicy.id())
.build());
// Permission targeting ALL organizations in the realm (organization_ids omitted).
var orgAdminsViewAllOrganizations = new OrganizationAdminPermissions("orgAdminsViewAllOrganizations", OrganizationAdminPermissionsArgs.builder()
.realmId(realm.id())
.name("org-admins-can-view-all-organizations")
.scopes("view")
.policies(orgAdminsPolicy.id())
.build());
}
}
resources:
realm:
type: keycloak:Realm
properties:
realm: my-realm
organizationsEnabled: true
adminPermissionsEnabled: true
orgAdmins:
type: keycloak:Group
name: org_admins
properties:
realmId: ${realm.id}
name: org-admins
acme:
type: keycloak:Organization
properties:
realm: ${realm.id}
name: acme
domains:
- name: acme.example.com
orgAdminsPolicy:
type: keycloak:openid:ClientGroupPolicy
name: org_admins_policy
properties:
realmId: ${realm.id}
resourceServerId: ${adminPermissions.id}
name: org-admins-policy
groups:
- id: ${orgAdmins.id}
path: ${orgAdmins.path}
extendChildren: false
logic: POSITIVE
decisionStrategy: UNANIMOUS
# Permission targeting a specific organization.
orgAdminsManageAcme:
type: keycloak:OrganizationAdminPermissions
name: org_admins_manage_acme
properties:
realmId: ${realm.id}
name: org-admins-manage-acme
description: Org admins can view and manage acme
decisionStrategy: UNANIMOUS
organizationIds:
- ${acme.id}
scopes:
- view
- manage
policies:
- ${orgAdminsPolicy.id}
# Permission targeting ALL organizations in the realm (organization_ids omitted).
orgAdminsViewAllOrganizations:
type: keycloak:OrganizationAdminPermissions
name: org_admins_view_all_organizations
properties:
realmId: ${realm.id}
name: org-admins-can-view-all-organizations
scopes:
- view
policies:
- ${orgAdminsPolicy.id}
variables:
adminPermissions:
fn::invoke:
function: keycloak:openid:getClient
arguments:
realmId: ${realm.id}
clientId: admin-permissions
terraform {
required_providers {
keycloak = {
source = "pulumi/keycloak"
}
}
}
data "keycloak_openid_client" "adminPermissions" {
realm_id = keycloak_realm.realm.id
client_id = "admin-permissions"
}
resource "keycloak_realm" "realm" {
lifecycle {
create_before_destroy = true
}
realm = "my-realm"
organizations_enabled = true
admin_permissions_enabled = true
}
resource "keycloak_group" "org_admins" {
lifecycle {
create_before_destroy = true
}
realm_id = keycloak_realm.realm.id
name = "org-admins"
}
resource "keycloak_organization" "acme" {
lifecycle {
create_before_destroy = true
}
realm = keycloak_realm.realm.id
name = "acme"
domain {
name = "acme.example.com"
}
}
resource "keycloak_openid_client_group_policy" "org_admins_policy" {
lifecycle {
create_before_destroy = true
}
realm_id = keycloak_realm.realm.id
resource_server_id = data.keycloak_openid_client.adminPermissions.id
name = "org-admins-policy"
groups {
id = keycloak_group.org_admins.id
path = keycloak_group.org_admins.path
extend_children = false
}
logic = "POSITIVE"
decision_strategy = "UNANIMOUS"
}
# Permission targeting a specific organization.
resource "keycloak_organization_admin_permissions" "org_admins_manage_acme" {
lifecycle {
create_before_destroy = true
}
realm_id = keycloak_realm.realm.id
name = "org-admins-manage-acme"
description = "Org admins can view and manage acme"
decision_strategy = "UNANIMOUS"
organization_ids = [keycloak_organization.acme.id]
scopes = ["view", "manage"]
policies = [keycloak_openid_client_group_policy.org_admins_policy.id]
}
# Permission targeting ALL organizations in the realm (organization_ids omitted).
resource "keycloak_organization_admin_permissions" "org_admins_view_all_organizations" {
lifecycle {
create_before_destroy = true
}
realm_id = keycloak_realm.realm.id
name = "org-admins-can-view-all-organizations"
scopes = ["view"]
policies = [keycloak_openid_client_group_policy.org_admins_policy.id]
}
Create OrganizationAdminPermissions Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new OrganizationAdminPermissions(name: string, args: OrganizationAdminPermissionsArgs, opts?: CustomResourceOptions);@overload
def OrganizationAdminPermissions(resource_name: str,
args: OrganizationAdminPermissionsArgs,
opts: Optional[ResourceOptions] = None)
@overload
def OrganizationAdminPermissions(resource_name: str,
opts: Optional[ResourceOptions] = None,
scopes: Optional[Sequence[str]] = None,
decision_strategy: Optional[str] = None,
description: Optional[str] = None,
name: Optional[str] = None,
organization_ids: Optional[Sequence[str]] = None,
policies: Optional[Sequence[str]] = None,
realm_id: Optional[str] = None,
realm_internal_id: Optional[str] = None)func NewOrganizationAdminPermissions(ctx *Context, name string, args OrganizationAdminPermissionsArgs, opts ...ResourceOption) (*OrganizationAdminPermissions, error)public OrganizationAdminPermissions(string name, OrganizationAdminPermissionsArgs args, CustomResourceOptions? opts = null)
public OrganizationAdminPermissions(String name, OrganizationAdminPermissionsArgs args)
public OrganizationAdminPermissions(String name, OrganizationAdminPermissionsArgs args, CustomResourceOptions options)
type: keycloak:OrganizationAdminPermissions
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.
resource "keycloak_organization_admin_permissions" "name" {
# resource properties
}Parameters
- name string
- The unique name of the resource.
- args OrganizationAdminPermissionsArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- resource_name str
- The unique name of the resource.
- args OrganizationAdminPermissionsArgs
- The arguments to resource properties.
- opts ResourceOptions
- Bag of options to control resource's behavior.
- ctx Context
- Context object for the current deployment.
- name string
- The unique name of the resource.
- args OrganizationAdminPermissionsArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args OrganizationAdminPermissionsArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args OrganizationAdminPermissionsArgs
- The arguments to resource properties.
- options CustomResourceOptions
- Bag of options to control resource's behavior.
Constructor example
The following reference example uses placeholder values for all input properties.
var organizationAdminPermissionsResource = new Keycloak.OrganizationAdminPermissions("organizationAdminPermissionsResource", new()
{
Scopes = new[]
{
"string",
},
DecisionStrategy = "string",
Description = "string",
Name = "string",
OrganizationIds = new[]
{
"string",
},
Policies = new[]
{
"string",
},
RealmId = "string",
RealmInternalId = "string",
});
example, err := keycloak.NewOrganizationAdminPermissions(ctx, "organizationAdminPermissionsResource", &keycloak.OrganizationAdminPermissionsArgs{
Scopes: pulumi.StringArray{
pulumi.String("string"),
},
DecisionStrategy: pulumi.String("string"),
Description: pulumi.String("string"),
Name: pulumi.String("string"),
OrganizationIds: pulumi.StringArray{
pulumi.String("string"),
},
Policies: pulumi.StringArray{
pulumi.String("string"),
},
RealmId: pulumi.String("string"),
RealmInternalId: pulumi.String("string"),
})
resource "keycloak_organization_admin_permissions" "organizationAdminPermissionsResource" {
lifecycle {
create_before_destroy = true
}
scopes = ["string"]
decision_strategy = "string"
description = "string"
name = "string"
organization_ids = ["string"]
policies = ["string"]
realm_id = "string"
realm_internal_id = "string"
}
var organizationAdminPermissionsResource = new OrganizationAdminPermissions("organizationAdminPermissionsResource", OrganizationAdminPermissionsArgs.builder()
.scopes("string")
.decisionStrategy("string")
.description("string")
.name("string")
.organizationIds("string")
.policies("string")
.realmId("string")
.realmInternalId("string")
.build());
organization_admin_permissions_resource = keycloak.OrganizationAdminPermissions("organizationAdminPermissionsResource",
scopes=["string"],
decision_strategy="string",
description="string",
name="string",
organization_ids=["string"],
policies=["string"],
realm_id="string",
realm_internal_id="string")
const organizationAdminPermissionsResource = new keycloak.OrganizationAdminPermissions("organizationAdminPermissionsResource", {
scopes: ["string"],
decisionStrategy: "string",
description: "string",
name: "string",
organizationIds: ["string"],
policies: ["string"],
realmId: "string",
realmInternalId: "string",
});
type: keycloak:OrganizationAdminPermissions
properties:
decisionStrategy: string
description: string
name: string
organizationIds:
- string
policies:
- string
realmId: string
realmInternalId: string
scopes:
- string
OrganizationAdminPermissions Resource Properties
To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.
Inputs
In Python, inputs that are objects can be passed either as argument classes or as dictionary literals.
The OrganizationAdminPermissions resource accepts the following input properties:
- Scopes List<string>
- Set of scopes this permission grants. Valid values:
view,manage. - Decision
Strategy string - Decision strategy. One of
UNANIMOUS,AFFIRMATIVE, orCONSENSUS. Defaults toUNANIMOUS. - Description string
- Description of the permission.
- Name string
- The name of the permission. Must be unique within the
admin-permissionsresource server. On first apply, if a permission with this name already exists it is adopted; otherwise a new one is created. - Organization
Ids List<string> - Set of organization UUIDs (
keycloak_organization.xxx.id) this permission applies to. When omitted or empty, the permission applies to all organizations in the realm. - Policies List<string>
- Set of policy IDs to attach to the permission.
- Realm
Id string - The realm in which to manage this permission.
- Realm
Internal stringId - The internal id of the realm, as an alternative to realm_id. Unlike the realm name, it does not change when the realm is renamed.
- Scopes []string
- Set of scopes this permission grants. Valid values:
view,manage. - Decision
Strategy string - Decision strategy. One of
UNANIMOUS,AFFIRMATIVE, orCONSENSUS. Defaults toUNANIMOUS. - Description string
- Description of the permission.
- Name string
- The name of the permission. Must be unique within the
admin-permissionsresource server. On first apply, if a permission with this name already exists it is adopted; otherwise a new one is created. - Organization
Ids []string - Set of organization UUIDs (
keycloak_organization.xxx.id) this permission applies to. When omitted or empty, the permission applies to all organizations in the realm. - Policies []string
- Set of policy IDs to attach to the permission.
- Realm
Id string - The realm in which to manage this permission.
- Realm
Internal stringId - The internal id of the realm, as an alternative to realm_id. Unlike the realm name, it does not change when the realm is renamed.
- scopes list(string)
- Set of scopes this permission grants. Valid values:
view,manage. - decision_
strategy string - Decision strategy. One of
UNANIMOUS,AFFIRMATIVE, orCONSENSUS. Defaults toUNANIMOUS. - description string
- Description of the permission.
- name string
- The name of the permission. Must be unique within the
admin-permissionsresource server. On first apply, if a permission with this name already exists it is adopted; otherwise a new one is created. - organization_
ids list(string) - Set of organization UUIDs (
keycloak_organization.xxx.id) this permission applies to. When omitted or empty, the permission applies to all organizations in the realm. - policies list(string)
- Set of policy IDs to attach to the permission.
- realm_
id string - The realm in which to manage this permission.
- realm_
internal_ stringid - The internal id of the realm, as an alternative to realm_id. Unlike the realm name, it does not change when the realm is renamed.
- scopes List<String>
- Set of scopes this permission grants. Valid values:
view,manage. - decision
Strategy String - Decision strategy. One of
UNANIMOUS,AFFIRMATIVE, orCONSENSUS. Defaults toUNANIMOUS. - description String
- Description of the permission.
- name String
- The name of the permission. Must be unique within the
admin-permissionsresource server. On first apply, if a permission with this name already exists it is adopted; otherwise a new one is created. - organization
Ids List<String> - Set of organization UUIDs (
keycloak_organization.xxx.id) this permission applies to. When omitted or empty, the permission applies to all organizations in the realm. - policies List<String>
- Set of policy IDs to attach to the permission.
- realm
Id String - The realm in which to manage this permission.
- realm
Internal StringId - The internal id of the realm, as an alternative to realm_id. Unlike the realm name, it does not change when the realm is renamed.
- scopes string[]
- Set of scopes this permission grants. Valid values:
view,manage. - decision
Strategy string - Decision strategy. One of
UNANIMOUS,AFFIRMATIVE, orCONSENSUS. Defaults toUNANIMOUS. - description string
- Description of the permission.
- name string
- The name of the permission. Must be unique within the
admin-permissionsresource server. On first apply, if a permission with this name already exists it is adopted; otherwise a new one is created. - organization
Ids string[] - Set of organization UUIDs (
keycloak_organization.xxx.id) this permission applies to. When omitted or empty, the permission applies to all organizations in the realm. - policies string[]
- Set of policy IDs to attach to the permission.
- realm
Id string - The realm in which to manage this permission.
- realm
Internal stringId - The internal id of the realm, as an alternative to realm_id. Unlike the realm name, it does not change when the realm is renamed.
- scopes Sequence[str]
- Set of scopes this permission grants. Valid values:
view,manage. - decision_
strategy str - Decision strategy. One of
UNANIMOUS,AFFIRMATIVE, orCONSENSUS. Defaults toUNANIMOUS. - description str
- Description of the permission.
- name str
- The name of the permission. Must be unique within the
admin-permissionsresource server. On first apply, if a permission with this name already exists it is adopted; otherwise a new one is created. - organization_
ids Sequence[str] - Set of organization UUIDs (
keycloak_organization.xxx.id) this permission applies to. When omitted or empty, the permission applies to all organizations in the realm. - policies Sequence[str]
- Set of policy IDs to attach to the permission.
- realm_
id str - The realm in which to manage this permission.
- realm_
internal_ strid - The internal id of the realm, as an alternative to realm_id. Unlike the realm name, it does not change when the realm is renamed.
- scopes List<String>
- Set of scopes this permission grants. Valid values:
view,manage. - decision
Strategy String - Decision strategy. One of
UNANIMOUS,AFFIRMATIVE, orCONSENSUS. Defaults toUNANIMOUS. - description String
- Description of the permission.
- name String
- The name of the permission. Must be unique within the
admin-permissionsresource server. On first apply, if a permission with this name already exists it is adopted; otherwise a new one is created. - organization
Ids List<String> - Set of organization UUIDs (
keycloak_organization.xxx.id) this permission applies to. When omitted or empty, the permission applies to all organizations in the realm. - policies List<String>
- Set of policy IDs to attach to the permission.
- realm
Id String - The realm in which to manage this permission.
- realm
Internal StringId - The internal id of the realm, as an alternative to realm_id. Unlike the realm name, it does not change when the realm is renamed.
Outputs
All input properties are implicitly available as output properties. Additionally, the OrganizationAdminPermissions resource produces the following output properties:
- string
- The ID of the
admin-permissionsclient, which acts as the resource server for these permissions. - Enabled bool
- Always
truewhen the resource exists. - Id string
- The provider-assigned unique ID for this managed resource.
- Permission
Id string - The internal Keycloak UUID of the permission.
- string
- The ID of the
admin-permissionsclient, which acts as the resource server for these permissions. - Enabled bool
- Always
truewhen the resource exists. - Id string
- The provider-assigned unique ID for this managed resource.
- Permission
Id string - The internal Keycloak UUID of the permission.
- string
- The ID of the
admin-permissionsclient, which acts as the resource server for these permissions. - enabled bool
- Always
truewhen the resource exists. - id string
- The provider-assigned unique ID for this managed resource.
- permission_
id string - The internal Keycloak UUID of the permission.
- String
- The ID of the
admin-permissionsclient, which acts as the resource server for these permissions. - enabled Boolean
- Always
truewhen the resource exists. - id String
- The provider-assigned unique ID for this managed resource.
- permission
Id String - The internal Keycloak UUID of the permission.
- string
- The ID of the
admin-permissionsclient, which acts as the resource server for these permissions. - enabled boolean
- Always
truewhen the resource exists. - id string
- The provider-assigned unique ID for this managed resource.
- permission
Id string - The internal Keycloak UUID of the permission.
- str
- The ID of the
admin-permissionsclient, which acts as the resource server for these permissions. - enabled bool
- Always
truewhen the resource exists. - id str
- The provider-assigned unique ID for this managed resource.
- permission_
id str - The internal Keycloak UUID of the permission.
- String
- The ID of the
admin-permissionsclient, which acts as the resource server for these permissions. - enabled Boolean
- Always
truewhen the resource exists. - id String
- The provider-assigned unique ID for this managed resource.
- permission
Id String - The internal Keycloak UUID of the permission.
Look up Existing OrganizationAdminPermissions Resource
Get an existing OrganizationAdminPermissions resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.
public static get(name: string, id: Input<ID>, state?: OrganizationAdminPermissionsState, opts?: CustomResourceOptions): OrganizationAdminPermissions@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
authorization_resource_server_id: Optional[str] = None,
decision_strategy: Optional[str] = None,
description: Optional[str] = None,
enabled: Optional[bool] = None,
name: Optional[str] = None,
organization_ids: Optional[Sequence[str]] = None,
permission_id: Optional[str] = None,
policies: Optional[Sequence[str]] = None,
realm_id: Optional[str] = None,
realm_internal_id: Optional[str] = None,
scopes: Optional[Sequence[str]] = None) -> OrganizationAdminPermissionsfunc GetOrganizationAdminPermissions(ctx *Context, name string, id IDInput, state *OrganizationAdminPermissionsState, opts ...ResourceOption) (*OrganizationAdminPermissions, error)public static OrganizationAdminPermissions Get(string name, Input<string> id, OrganizationAdminPermissionsState? state, CustomResourceOptions? opts = null)public static OrganizationAdminPermissions get(String name, Output<String> id, OrganizationAdminPermissionsState state, CustomResourceOptions options)resources: existingOrganizationAdminPermissions: type: keycloak:OrganizationAdminPermissions get: id: ${id}import {
to = keycloak_organization_admin_permissions.example
id = "${id}"
}
- name string
- The unique name of the resulting resource.
- id Input<ID>
- The unique provider ID of the resource to look up.
- state OrganizationAdminPermissionsState
- Known property values the provider needs, along with the ID, to find the resource. Usually not required.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- resource_name str
- The unique name of the resulting resource.
- id str
- The unique provider ID of the resource to look up.
- opts ResourceOptions
- Bag of options to control resource's behavior.
- ctx Context
- Context object for the current deployment.
- name string
- The unique name of the resulting resource.
- id IDInput
- The unique provider ID of the resource to look up.
- state OrganizationAdminPermissionsState
- Known property values the provider needs, along with the ID, to find the resource. Usually not required.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resulting resource.
- id Input<string>
- The unique provider ID of the resource to look up.
- state OrganizationAdminPermissionsState
- Known property values the provider needs, along with the ID, to find the resource. Usually not required.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resulting resource.
- id Output<String>
- The unique provider ID of the resource to look up.
- state OrganizationAdminPermissionsState
- Known property values the provider needs, along with the ID, to find the resource. Usually not required.
- options CustomResourceOptions
- Bag of options to control resource's behavior.
- string
- The ID of the
admin-permissionsclient, which acts as the resource server for these permissions. - Decision
Strategy string - Decision strategy. One of
UNANIMOUS,AFFIRMATIVE, orCONSENSUS. Defaults toUNANIMOUS. - Description string
- Description of the permission.
- Enabled bool
- Always
truewhen the resource exists. - Name string
- The name of the permission. Must be unique within the
admin-permissionsresource server. On first apply, if a permission with this name already exists it is adopted; otherwise a new one is created. - Organization
Ids List<string> - Set of organization UUIDs (
keycloak_organization.xxx.id) this permission applies to. When omitted or empty, the permission applies to all organizations in the realm. - Permission
Id string - The internal Keycloak UUID of the permission.
- Policies List<string>
- Set of policy IDs to attach to the permission.
- Realm
Id string - The realm in which to manage this permission.
- Realm
Internal stringId - The internal id of the realm, as an alternative to realm_id. Unlike the realm name, it does not change when the realm is renamed.
- Scopes List<string>
- Set of scopes this permission grants. Valid values:
view,manage.
- string
- The ID of the
admin-permissionsclient, which acts as the resource server for these permissions. - Decision
Strategy string - Decision strategy. One of
UNANIMOUS,AFFIRMATIVE, orCONSENSUS. Defaults toUNANIMOUS. - Description string
- Description of the permission.
- Enabled bool
- Always
truewhen the resource exists. - Name string
- The name of the permission. Must be unique within the
admin-permissionsresource server. On first apply, if a permission with this name already exists it is adopted; otherwise a new one is created. - Organization
Ids []string - Set of organization UUIDs (
keycloak_organization.xxx.id) this permission applies to. When omitted or empty, the permission applies to all organizations in the realm. - Permission
Id string - The internal Keycloak UUID of the permission.
- Policies []string
- Set of policy IDs to attach to the permission.
- Realm
Id string - The realm in which to manage this permission.
- Realm
Internal stringId - The internal id of the realm, as an alternative to realm_id. Unlike the realm name, it does not change when the realm is renamed.
- Scopes []string
- Set of scopes this permission grants. Valid values:
view,manage.
- string
- The ID of the
admin-permissionsclient, which acts as the resource server for these permissions. - decision_
strategy string - Decision strategy. One of
UNANIMOUS,AFFIRMATIVE, orCONSENSUS. Defaults toUNANIMOUS. - description string
- Description of the permission.
- enabled bool
- Always
truewhen the resource exists. - name string
- The name of the permission. Must be unique within the
admin-permissionsresource server. On first apply, if a permission with this name already exists it is adopted; otherwise a new one is created. - organization_
ids list(string) - Set of organization UUIDs (
keycloak_organization.xxx.id) this permission applies to. When omitted or empty, the permission applies to all organizations in the realm. - permission_
id string - The internal Keycloak UUID of the permission.
- policies list(string)
- Set of policy IDs to attach to the permission.
- realm_
id string - The realm in which to manage this permission.
- realm_
internal_ stringid - The internal id of the realm, as an alternative to realm_id. Unlike the realm name, it does not change when the realm is renamed.
- scopes list(string)
- Set of scopes this permission grants. Valid values:
view,manage.
- String
- The ID of the
admin-permissionsclient, which acts as the resource server for these permissions. - decision
Strategy String - Decision strategy. One of
UNANIMOUS,AFFIRMATIVE, orCONSENSUS. Defaults toUNANIMOUS. - description String
- Description of the permission.
- enabled Boolean
- Always
truewhen the resource exists. - name String
- The name of the permission. Must be unique within the
admin-permissionsresource server. On first apply, if a permission with this name already exists it is adopted; otherwise a new one is created. - organization
Ids List<String> - Set of organization UUIDs (
keycloak_organization.xxx.id) this permission applies to. When omitted or empty, the permission applies to all organizations in the realm. - permission
Id String - The internal Keycloak UUID of the permission.
- policies List<String>
- Set of policy IDs to attach to the permission.
- realm
Id String - The realm in which to manage this permission.
- realm
Internal StringId - The internal id of the realm, as an alternative to realm_id. Unlike the realm name, it does not change when the realm is renamed.
- scopes List<String>
- Set of scopes this permission grants. Valid values:
view,manage.
- string
- The ID of the
admin-permissionsclient, which acts as the resource server for these permissions. - decision
Strategy string - Decision strategy. One of
UNANIMOUS,AFFIRMATIVE, orCONSENSUS. Defaults toUNANIMOUS. - description string
- Description of the permission.
- enabled boolean
- Always
truewhen the resource exists. - name string
- The name of the permission. Must be unique within the
admin-permissionsresource server. On first apply, if a permission with this name already exists it is adopted; otherwise a new one is created. - organization
Ids string[] - Set of organization UUIDs (
keycloak_organization.xxx.id) this permission applies to. When omitted or empty, the permission applies to all organizations in the realm. - permission
Id string - The internal Keycloak UUID of the permission.
- policies string[]
- Set of policy IDs to attach to the permission.
- realm
Id string - The realm in which to manage this permission.
- realm
Internal stringId - The internal id of the realm, as an alternative to realm_id. Unlike the realm name, it does not change when the realm is renamed.
- scopes string[]
- Set of scopes this permission grants. Valid values:
view,manage.
- str
- The ID of the
admin-permissionsclient, which acts as the resource server for these permissions. - decision_
strategy str - Decision strategy. One of
UNANIMOUS,AFFIRMATIVE, orCONSENSUS. Defaults toUNANIMOUS. - description str
- Description of the permission.
- enabled bool
- Always
truewhen the resource exists. - name str
- The name of the permission. Must be unique within the
admin-permissionsresource server. On first apply, if a permission with this name already exists it is adopted; otherwise a new one is created. - organization_
ids Sequence[str] - Set of organization UUIDs (
keycloak_organization.xxx.id) this permission applies to. When omitted or empty, the permission applies to all organizations in the realm. - permission_
id str - The internal Keycloak UUID of the permission.
- policies Sequence[str]
- Set of policy IDs to attach to the permission.
- realm_
id str - The realm in which to manage this permission.
- realm_
internal_ strid - The internal id of the realm, as an alternative to realm_id. Unlike the realm name, it does not change when the realm is renamed.
- scopes Sequence[str]
- Set of scopes this permission grants. Valid values:
view,manage.
- String
- The ID of the
admin-permissionsclient, which acts as the resource server for these permissions. - decision
Strategy String - Decision strategy. One of
UNANIMOUS,AFFIRMATIVE, orCONSENSUS. Defaults toUNANIMOUS. - description String
- Description of the permission.
- enabled Boolean
- Always
truewhen the resource exists. - name String
- The name of the permission. Must be unique within the
admin-permissionsresource server. On first apply, if a permission with this name already exists it is adopted; otherwise a new one is created. - organization
Ids List<String> - Set of organization UUIDs (
keycloak_organization.xxx.id) this permission applies to. When omitted or empty, the permission applies to all organizations in the realm. - permission
Id String - The internal Keycloak UUID of the permission.
- policies List<String>
- Set of policy IDs to attach to the permission.
- realm
Id String - The realm in which to manage this permission.
- realm
Internal StringId - The internal id of the realm, as an alternative to realm_id. Unlike the realm name, it does not change when the realm is renamed.
- scopes List<String>
- Set of scopes this permission grants. Valid values:
view,manage.
Import
Organization admin permissions can be imported using {{realmId}}/{{permissionId}}:
$ pulumi import keycloak:index/organizationAdminPermissions:OrganizationAdminPermissions example my-realm/permission-uuid
After import, run pulumi up to reconcile organizationIds, scopes, and policies with your configuration.
To learn more about importing existing cloud resources, see Importing resources.
Package Details
- Repository
- Keycloak pulumi/pulumi-keycloak
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
keycloakTerraform Provider.
published on Saturday, Nov 21, 2026 by Pulumi