1. Packages
  2. Okta Provider
  3. API Docs
  4. getPrincipalEntitlements
Okta v6.1.0 published on Wednesday, Oct 29, 2025 by Pulumi

okta.getPrincipalEntitlements

Get Started
okta logo
Okta v6.1.0 published on Wednesday, Oct 29, 2025 by Pulumi

    Get the entitlements for a user and resource after evaluating all grants.

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as okta from "@pulumi/okta";
    
    const test = okta.getPrincipalEntitlements({
        parent: {
            externalId: "<resource_id>",
            type: "<resource_type>",
        },
        targetPrincipal: {
            externalId: "<principal_id>",
            type: "<principal_type>",
        },
    });
    
    import pulumi
    import pulumi_okta as okta
    
    test = okta.get_principal_entitlements(parent={
            "external_id": "<resource_id>",
            "type": "<resource_type>",
        },
        target_principal={
            "external_id": "<principal_id>",
            "type": "<principal_type>",
        })
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-okta/sdk/v6/go/okta"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_, err := okta.GetPrincipalEntitlements(ctx, &okta.GetPrincipalEntitlementsArgs{
    			Parent: okta.GetPrincipalEntitlementsParent{
    				ExternalId: "<resource_id>",
    				Type:       "<resource_type>",
    			},
    			TargetPrincipal: okta.GetPrincipalEntitlementsTargetPrincipal{
    				ExternalId: "<principal_id>",
    				Type:       "<principal_type>",
    			},
    		}, nil)
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Okta = Pulumi.Okta;
    
    return await Deployment.RunAsync(() => 
    {
        var test = Okta.GetPrincipalEntitlements.Invoke(new()
        {
            Parent = new Okta.Inputs.GetPrincipalEntitlementsParentInputArgs
            {
                ExternalId = "<resource_id>",
                Type = "<resource_type>",
            },
            TargetPrincipal = new Okta.Inputs.GetPrincipalEntitlementsTargetPrincipalInputArgs
            {
                ExternalId = "<principal_id>",
                Type = "<principal_type>",
            },
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.okta.OktaFunctions;
    import com.pulumi.okta.inputs.GetPrincipalEntitlementsArgs;
    import com.pulumi.okta.inputs.GetPrincipalEntitlementsParentArgs;
    import com.pulumi.okta.inputs.GetPrincipalEntitlementsTargetPrincipalArgs;
    import java.util.List;
    import java.util.ArrayList;
    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) {
            final var test = OktaFunctions.getPrincipalEntitlements(GetPrincipalEntitlementsArgs.builder()
                .parent(GetPrincipalEntitlementsParentArgs.builder()
                    .externalId("<resource_id>")
                    .type("<resource_type>")
                    .build())
                .targetPrincipal(GetPrincipalEntitlementsTargetPrincipalArgs.builder()
                    .externalId("<principal_id>")
                    .type("<principal_type>")
                    .build())
                .build());
    
        }
    }
    
    variables:
      test:
        fn::invoke:
          function: okta:getPrincipalEntitlements
          arguments:
            parent:
              externalId: <resource_id>
              type: <resource_type>
            targetPrincipal:
              externalId: <principal_id>
              type: <principal_type>
    

    Required:

    • external_id (String) The Okta user’s email address.
    • type (String) The Okta user id.

    Nested Schema for target_principal

    Required:

    • external_id (String) The Okta user id.
    • type (String) The type of principal. Enum: OKTA_USER.

    Nested Schema for data

    Required:

    • parent (Object) Representation of a resource. (see below for nested schema)
    • target_principal (Object) Representation of a principal. (see below for nested schema)

    Optional:

    • data_type (String) The data type of the entitlement property. Enum: array, string.
    • description (String) The Okta user id.
    • external_value (String) The type of principal. Enum: OKTA_USER.
    • id (String) The unique identifier of the entitlement.
    • multi_value (Boolean) Indicates if the entitlement is multi-valued.
    • name (String) The name of the entitlement.
    • parent_resource_orn (String) The Okta app instance, in ORN format.
    • required (Boolean) Indicates if the entitlement is required.
    • target_principal_orn (String) The Okta user id, in ORN format.
    • values (List of Objects) The values of the entitlement. (see below for nested schema)

    Nested Schema for values

    • description (String) The description of the value.
    • external_id (String) The external ID of the value.
    • external_value (String) The value of an entitlement property value.
    • id (String) The unique identifier of the value.
    • name (String) The name of the value.

    Using getPrincipalEntitlements

    Two invocation forms are available. The direct form accepts plain arguments and either blocks until the result value is available, or returns a Promise-wrapped result. The output form accepts Input-wrapped arguments and returns an Output-wrapped result.

    function getPrincipalEntitlements(args: GetPrincipalEntitlementsArgs, opts?: InvokeOptions): Promise<GetPrincipalEntitlementsResult>
    function getPrincipalEntitlementsOutput(args: GetPrincipalEntitlementsOutputArgs, opts?: InvokeOptions): Output<GetPrincipalEntitlementsResult>
    def get_principal_entitlements(datas: Optional[Sequence[GetPrincipalEntitlementsData]] = None,
                                   parent: Optional[GetPrincipalEntitlementsParent] = None,
                                   target_principal: Optional[GetPrincipalEntitlementsTargetPrincipal] = None,
                                   opts: Optional[InvokeOptions] = None) -> GetPrincipalEntitlementsResult
    def get_principal_entitlements_output(datas: Optional[pulumi.Input[Sequence[pulumi.Input[GetPrincipalEntitlementsDataArgs]]]] = None,
                                   parent: Optional[pulumi.Input[GetPrincipalEntitlementsParentArgs]] = None,
                                   target_principal: Optional[pulumi.Input[GetPrincipalEntitlementsTargetPrincipalArgs]] = None,
                                   opts: Optional[InvokeOptions] = None) -> Output[GetPrincipalEntitlementsResult]
    func GetPrincipalEntitlements(ctx *Context, args *GetPrincipalEntitlementsArgs, opts ...InvokeOption) (*GetPrincipalEntitlementsResult, error)
    func GetPrincipalEntitlementsOutput(ctx *Context, args *GetPrincipalEntitlementsOutputArgs, opts ...InvokeOption) GetPrincipalEntitlementsResultOutput

    > Note: This function is named GetPrincipalEntitlements in the Go SDK.

    public static class GetPrincipalEntitlements 
    {
        public static Task<GetPrincipalEntitlementsResult> InvokeAsync(GetPrincipalEntitlementsArgs args, InvokeOptions? opts = null)
        public static Output<GetPrincipalEntitlementsResult> Invoke(GetPrincipalEntitlementsInvokeArgs args, InvokeOptions? opts = null)
    }
    public static CompletableFuture<GetPrincipalEntitlementsResult> getPrincipalEntitlements(GetPrincipalEntitlementsArgs args, InvokeOptions options)
    public static Output<GetPrincipalEntitlementsResult> getPrincipalEntitlements(GetPrincipalEntitlementsArgs args, InvokeOptions options)
    
    fn::invoke:
      function: okta:index/getPrincipalEntitlements:getPrincipalEntitlements
      arguments:
        # arguments dictionary

    The following arguments are supported:

    Datas List<GetPrincipalEntitlementsData>
    Principal entitlements list.
    Parent GetPrincipalEntitlementsParent
    Representation of a resource.
    TargetPrincipal GetPrincipalEntitlementsTargetPrincipal
    Representation of a principal.
    Datas []GetPrincipalEntitlementsData
    Principal entitlements list.
    Parent GetPrincipalEntitlementsParent
    Representation of a resource.
    TargetPrincipal GetPrincipalEntitlementsTargetPrincipal
    Representation of a principal.
    datas List<GetPrincipalEntitlementsData>
    Principal entitlements list.
    parent GetPrincipalEntitlementsParent
    Representation of a resource.
    targetPrincipal GetPrincipalEntitlementsTargetPrincipal
    Representation of a principal.
    datas GetPrincipalEntitlementsData[]
    Principal entitlements list.
    parent GetPrincipalEntitlementsParent
    Representation of a resource.
    targetPrincipal GetPrincipalEntitlementsTargetPrincipal
    Representation of a principal.
    datas Sequence[GetPrincipalEntitlementsData]
    Principal entitlements list.
    parent GetPrincipalEntitlementsParent
    Representation of a resource.
    target_principal GetPrincipalEntitlementsTargetPrincipal
    Representation of a principal.
    datas List<Property Map>
    Principal entitlements list.
    parent Property Map
    Representation of a resource.
    targetPrincipal Property Map
    Representation of a principal.

    getPrincipalEntitlements Result

    The following output properties are available:

    Id string
    Datas List<GetPrincipalEntitlementsData>
    Principal entitlements list.
    Parent GetPrincipalEntitlementsParent
    Representation of a resource.
    TargetPrincipal GetPrincipalEntitlementsTargetPrincipal
    Representation of a principal.
    Id string
    Datas []GetPrincipalEntitlementsData
    Principal entitlements list.
    Parent GetPrincipalEntitlementsParent
    Representation of a resource.
    TargetPrincipal GetPrincipalEntitlementsTargetPrincipal
    Representation of a principal.
    id String
    datas List<GetPrincipalEntitlementsData>
    Principal entitlements list.
    parent GetPrincipalEntitlementsParent
    Representation of a resource.
    targetPrincipal GetPrincipalEntitlementsTargetPrincipal
    Representation of a principal.
    id string
    datas GetPrincipalEntitlementsData[]
    Principal entitlements list.
    parent GetPrincipalEntitlementsParent
    Representation of a resource.
    targetPrincipal GetPrincipalEntitlementsTargetPrincipal
    Representation of a principal.
    id str
    datas Sequence[GetPrincipalEntitlementsData]
    Principal entitlements list.
    parent GetPrincipalEntitlementsParent
    Representation of a resource.
    target_principal GetPrincipalEntitlementsTargetPrincipal
    Representation of a principal.
    id String
    datas List<Property Map>
    Principal entitlements list.
    parent Property Map
    Representation of a resource.
    targetPrincipal Property Map
    Representation of a principal.

    Supporting Types

    GetPrincipalEntitlementsData

    DataType string
    The data type of the entitlement property.
    Description string
    The description of an entitlement property.
    ExternalValue string
    The value of an entitlement property.
    Id string
    The id property of an entitlement.
    MultiValue bool
    The property that determines if the entitlement property can hold multiple values.
    Name string
    The display name for an entitlement property.
    ParentResourceOrn string
    The Okta app instance, in ORN format.
    Required bool
    The property that determines if the entitlement property is a required attribute
    TargetPrincipalOrn string
    The Okta user id in ORN format.
    Parent GetPrincipalEntitlementsDataParent
    Representation of a resource.
    TargetPrincipal GetPrincipalEntitlementsDataTargetPrincipal
    Representation of a principal.
    Values List<GetPrincipalEntitlementsDataValue>
    Collection of entitlement values.
    DataType string
    The data type of the entitlement property.
    Description string
    The description of an entitlement property.
    ExternalValue string
    The value of an entitlement property.
    Id string
    The id property of an entitlement.
    MultiValue bool
    The property that determines if the entitlement property can hold multiple values.
    Name string
    The display name for an entitlement property.
    ParentResourceOrn string
    The Okta app instance, in ORN format.
    Required bool
    The property that determines if the entitlement property is a required attribute
    TargetPrincipalOrn string
    The Okta user id in ORN format.
    Parent GetPrincipalEntitlementsDataParent
    Representation of a resource.
    TargetPrincipal GetPrincipalEntitlementsDataTargetPrincipal
    Representation of a principal.
    Values []GetPrincipalEntitlementsDataValue
    Collection of entitlement values.
    dataType String
    The data type of the entitlement property.
    description String
    The description of an entitlement property.
    externalValue String
    The value of an entitlement property.
    id String
    The id property of an entitlement.
    multiValue Boolean
    The property that determines if the entitlement property can hold multiple values.
    name String
    The display name for an entitlement property.
    parentResourceOrn String
    The Okta app instance, in ORN format.
    required Boolean
    The property that determines if the entitlement property is a required attribute
    targetPrincipalOrn String
    The Okta user id in ORN format.
    parent GetPrincipalEntitlementsDataParent
    Representation of a resource.
    targetPrincipal GetPrincipalEntitlementsDataTargetPrincipal
    Representation of a principal.
    values List<GetPrincipalEntitlementsDataValue>
    Collection of entitlement values.
    dataType string
    The data type of the entitlement property.
    description string
    The description of an entitlement property.
    externalValue string
    The value of an entitlement property.
    id string
    The id property of an entitlement.
    multiValue boolean
    The property that determines if the entitlement property can hold multiple values.
    name string
    The display name for an entitlement property.
    parentResourceOrn string
    The Okta app instance, in ORN format.
    required boolean
    The property that determines if the entitlement property is a required attribute
    targetPrincipalOrn string
    The Okta user id in ORN format.
    parent GetPrincipalEntitlementsDataParent
    Representation of a resource.
    targetPrincipal GetPrincipalEntitlementsDataTargetPrincipal
    Representation of a principal.
    values GetPrincipalEntitlementsDataValue[]
    Collection of entitlement values.
    data_type str
    The data type of the entitlement property.
    description str
    The description of an entitlement property.
    external_value str
    The value of an entitlement property.
    id str
    The id property of an entitlement.
    multi_value bool
    The property that determines if the entitlement property can hold multiple values.
    name str
    The display name for an entitlement property.
    parent_resource_orn str
    The Okta app instance, in ORN format.
    required bool
    The property that determines if the entitlement property is a required attribute
    target_principal_orn str
    The Okta user id in ORN format.
    parent GetPrincipalEntitlementsDataParent
    Representation of a resource.
    target_principal GetPrincipalEntitlementsDataTargetPrincipal
    Representation of a principal.
    values Sequence[GetPrincipalEntitlementsDataValue]
    Collection of entitlement values.
    dataType String
    The data type of the entitlement property.
    description String
    The description of an entitlement property.
    externalValue String
    The value of an entitlement property.
    id String
    The id property of an entitlement.
    multiValue Boolean
    The property that determines if the entitlement property can hold multiple values.
    name String
    The display name for an entitlement property.
    parentResourceOrn String
    The Okta app instance, in ORN format.
    required Boolean
    The property that determines if the entitlement property is a required attribute
    targetPrincipalOrn String
    The Okta user id in ORN format.
    parent Property Map
    Representation of a resource.
    targetPrincipal Property Map
    Representation of a principal.
    values List<Property Map>
    Collection of entitlement values.

    GetPrincipalEntitlementsDataParent

    ExternalId string
    The Okta id of the resource.
    Type string
    The type of the resource.
    ExternalId string
    The Okta id of the resource.
    Type string
    The type of the resource.
    externalId String
    The Okta id of the resource.
    type String
    The type of the resource.
    externalId string
    The Okta id of the resource.
    type string
    The type of the resource.
    external_id str
    The Okta id of the resource.
    type str
    The type of the resource.
    externalId String
    The Okta id of the resource.
    type String
    The type of the resource.

    GetPrincipalEntitlementsDataTargetPrincipal

    ExternalId string
    The Okta user id.
    Type string
    The type of principal.
    ExternalId string
    The Okta user id.
    Type string
    The type of principal.
    externalId String
    The Okta user id.
    type String
    The type of principal.
    externalId string
    The Okta user id.
    type string
    The type of principal.
    external_id str
    The Okta user id.
    type str
    The type of principal.
    externalId String
    The Okta user id.
    type String
    The type of principal.

    GetPrincipalEntitlementsDataValue

    Description string
    The description of an entitlement property.
    ExternalValue string
    The value of an entitlement property value.
    Id string
    The id of an entitlement value.
    Name string
    The name of an entitlement value.
    Description string
    The description of an entitlement property.
    ExternalValue string
    The value of an entitlement property value.
    Id string
    The id of an entitlement value.
    Name string
    The name of an entitlement value.
    description String
    The description of an entitlement property.
    externalValue String
    The value of an entitlement property value.
    id String
    The id of an entitlement value.
    name String
    The name of an entitlement value.
    description string
    The description of an entitlement property.
    externalValue string
    The value of an entitlement property value.
    id string
    The id of an entitlement value.
    name string
    The name of an entitlement value.
    description str
    The description of an entitlement property.
    external_value str
    The value of an entitlement property value.
    id str
    The id of an entitlement value.
    name str
    The name of an entitlement value.
    description String
    The description of an entitlement property.
    externalValue String
    The value of an entitlement property value.
    id String
    The id of an entitlement value.
    name String
    The name of an entitlement value.

    GetPrincipalEntitlementsParent

    ExternalId string
    Type string
    ExternalId string
    Type string
    externalId String
    type String
    externalId string
    type string
    externalId String
    type String

    GetPrincipalEntitlementsTargetPrincipal

    ExternalId string
    Type string
    ExternalId string
    Type string
    externalId String
    type String
    externalId string
    type string
    externalId String
    type String

    Package Details

    Repository
    Okta pulumi/pulumi-okta
    License
    Apache-2.0
    Notes
    This Pulumi package is based on the okta Terraform Provider.
    okta logo
    Okta v6.1.0 published on Wednesday, Oct 29, 2025 by Pulumi
      Meet Neo: Your AI Platform Teammate