1. Packages
  2. Packages
  3. Power Platform
  4. API Docs
  5. getSecurityRoles
Viewing docs for Power Platform v0.4.1
published on Monday, Jun 15, 2026 by rpothin
powerplatform logo
Viewing docs for Power Platform v0.4.1
published on Monday, Jun 15, 2026 by rpothin

    Fetches Dataverse security roles from a Power Platform environment.

    Using getSecurityRoles

    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 getSecurityRoles(args: GetSecurityRolesArgs, opts?: InvokeOptions): Promise<GetSecurityRolesResult>
    function getSecurityRolesOutput(args: GetSecurityRolesOutputArgs, opts?: InvokeOptions): Output<GetSecurityRolesResult>
    def get_security_roles(business_unit_id: Optional[str] = None,
                           environment_id: Optional[str] = None,
                           opts: Optional[InvokeOptions] = None) -> GetSecurityRolesResult
    def get_security_roles_output(business_unit_id: pulumi.Input[Optional[str]] = None,
                           environment_id: pulumi.Input[Optional[str]] = None,
                           opts: Optional[InvokeOptions] = None) -> Output[GetSecurityRolesResult]
    func GetSecurityRoles(ctx *Context, args *GetSecurityRolesArgs, opts ...InvokeOption) (*GetSecurityRolesResult, error)
    func GetSecurityRolesOutput(ctx *Context, args *GetSecurityRolesOutputArgs, opts ...InvokeOption) GetSecurityRolesResultOutput

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

    public static class GetSecurityRoles 
    {
        public static Task<GetSecurityRolesResult> InvokeAsync(GetSecurityRolesArgs args, InvokeOptions? opts = null)
        public static Output<GetSecurityRolesResult> Invoke(GetSecurityRolesInvokeArgs args, InvokeOptions? opts = null)
    }
    public static CompletableFuture<GetSecurityRolesResult> getSecurityRoles(GetSecurityRolesArgs args, InvokeOptions options)
    public static Output<GetSecurityRolesResult> getSecurityRoles(GetSecurityRolesArgs args, InvokeOptions options)
    
    fn::invoke:
      function: powerplatform:getSecurityRoles
      arguments:
        # arguments dictionary
    data "powerplatform_getsecurityroles" "name" {
        # arguments
    }

    The following arguments are supported:

    EnvironmentId string
    Environment ID to query roles from.
    BusinessUnitId string
    Optional business unit GUID to filter roles.
    EnvironmentId string
    Environment ID to query roles from.
    BusinessUnitId string
    Optional business unit GUID to filter roles.
    environment_id string
    Environment ID to query roles from.
    business_unit_id string
    Optional business unit GUID to filter roles.
    environmentId String
    Environment ID to query roles from.
    businessUnitId String
    Optional business unit GUID to filter roles.
    environmentId string
    Environment ID to query roles from.
    businessUnitId string
    Optional business unit GUID to filter roles.
    environment_id str
    Environment ID to query roles from.
    business_unit_id str
    Optional business unit GUID to filter roles.
    environmentId String
    Environment ID to query roles from.
    businessUnitId String
    Optional business unit GUID to filter roles.

    getSecurityRoles Result

    The following output properties are available:

    SecurityRoles List<SecurityRole>
    List of security roles.
    SecurityRoles []SecurityRole
    List of security roles.
    security_roles list(object)
    List of security roles.
    securityRoles List<SecurityRole>
    List of security roles.
    securityRoles SecurityRole[]
    List of security roles.
    security_roles Sequence[SecurityRole]
    List of security roles.
    securityRoles List<Property Map>
    List of security roles.

    Supporting Types

    SecurityRole

    BusinessUnitId string
    Business unit GUID this role belongs to.
    Name string
    Security role display name.
    RoleId string
    Security role GUID.
    BusinessUnitId string
    Business unit GUID this role belongs to.
    Name string
    Security role display name.
    RoleId string
    Security role GUID.
    business_unit_id string
    Business unit GUID this role belongs to.
    name string
    Security role display name.
    role_id string
    Security role GUID.
    businessUnitId String
    Business unit GUID this role belongs to.
    name String
    Security role display name.
    roleId String
    Security role GUID.
    businessUnitId string
    Business unit GUID this role belongs to.
    name string
    Security role display name.
    roleId string
    Security role GUID.
    business_unit_id str
    Business unit GUID this role belongs to.
    name str
    Security role display name.
    role_id str
    Security role GUID.
    businessUnitId String
    Business unit GUID this role belongs to.
    name String
    Security role display name.
    roleId String
    Security role GUID.

    Package Details

    Repository
    powerplatform rpothin/pulumi-powerplatform
    License
    MIT
    powerplatform logo
    Viewing docs for Power Platform v0.4.1
    published on Monday, Jun 15, 2026 by rpothin

      Try Pulumi Cloud free.
      Your team will thank you.

      Start free trial