1. Registry
  2. Packages
  3. Descope Provider
  4. API Docs
  5. Project
Viewing docs for Descope v1.0.1
published on Sunday, Oct 11, 2026 by Descope
descope logo Descope
Viewing docs for Descope v1.0.1
published on Sunday, Oct 11, 2026 by Descope

    Manages a Descope project. A project is the core entity in Descope—its authentication settings, user flows, roles, connectors, applications, and other configuration are managed with the standalone descope_* resources that reference the project by ID.

    This resource manages project configuration, not users or tenants. For user management, use the Descope Management API or SDKs.

    For a full reference of all supported connectors, see the connectors reference in the Descope documentation.

    Example Usage

    Basic Project

    import * as pulumi from "@pulumi/pulumi";
    import * as descope from "@descope/pulumi-descope";
    
    const example = new descope.Project("example", {
        name: "my-app",
        environment: "production",
        tags: [
            "prod",
            "v2",
        ],
    });
    
    import pulumi
    import descope_pulumi as descope
    
    example = descope.Project("example",
        name="my-app",
        environment="production",
        tags=[
            "prod",
            "v2",
        ])
    
    package main
    
    import (
    	"github.com/descope/pulumi-descope/sdk/go/descope"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_, err := descope.NewProject(ctx, "example", &descope.ProjectArgs{
    			Name:        pulumi.String("my-app"),
    			Environment: pulumi.String("production"),
    			Tags: pulumi.StringArray{
    				pulumi.String("prod"),
    				pulumi.String("v2"),
    			},
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Descope = Descope.Pulumi.Descope;
    
    return await Deployment.RunAsync(() => 
    {
        var example = new Descope.Project("example", new()
        {
            Name = "my-app",
            Environment = "production",
            Tags = new[]
            {
                "prod",
                "v2",
            },
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.descope.pulumi.descope.Project;
    import com.descope.pulumi.descope.ProjectArgs;
    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 example = new Project("example", ProjectArgs.builder()
                .name("my-app")
                .environment("production")
                .tags(            
                    "prod",
                    "v2")
                .build());
    
        }
    }
    
    resources:
      example:
        type: descope:Project
        properties:
          name: my-app
          environment: production
          tags:
            - prod
            - v2
    
    pulumi {
      required_providers {
        descope = {
          source = "pulumi/descope"
        }
      }
    }
    
    resource "descope_project" "example" {
      name        = "my-app"
      environment = "production"
      tags        = ["prod", "v2"]
    }
    

    Authentication Methods

    Authentication method settings are managed with their own standalone resources, such as descope.MagiclinkSettings, descope.OtpSettings, descope.PasswordSettings, and descope.SsoSettings:

    import * as pulumi from "@pulumi/pulumi";
    import * as descope from "@descope/pulumi-descope";
    
    const example = new descope.Project("example", {name: "my-app"});
    const exampleMagiclinkSettings = new descope.MagiclinkSettings("example", {
        projectId: example.id,
        expirationTime: "1 hour",
    });
    const examplePasswordSettings = new descope.PasswordSettings("example", {
        projectId: example.id,
        lock: true,
        lockAttempts: 5,
        minLength: 12,
    });
    
    import pulumi
    import descope_pulumi as descope
    
    example = descope.Project("example", name="my-app")
    example_magiclink_settings = descope.MagiclinkSettings("example",
        project_id=example.id,
        expiration_time="1 hour")
    example_password_settings = descope.PasswordSettings("example",
        project_id=example.id,
        lock=True,
        lock_attempts=5,
        min_length=12)
    
    package main
    
    import (
    	"github.com/descope/pulumi-descope/sdk/go/descope"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		example, err := descope.NewProject(ctx, "example", &descope.ProjectArgs{
    			Name: pulumi.String("my-app"),
    		})
    		if err != nil {
    			return err
    		}
    		_, err = descope.NewMagiclinkSettings(ctx, "example", &descope.MagiclinkSettingsArgs{
    			ProjectId:      example.ID(),
    			ExpirationTime: pulumi.String("1 hour"),
    		})
    		if err != nil {
    			return err
    		}
    		_, err = descope.NewPasswordSettings(ctx, "example", &descope.PasswordSettingsArgs{
    			ProjectId:    example.ID(),
    			Lock:         pulumi.Bool(true),
    			LockAttempts: pulumi.Int(5),
    			MinLength:    pulumi.Int(12),
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Descope = Descope.Pulumi.Descope;
    
    return await Deployment.RunAsync(() => 
    {
        var example = new Descope.Project("example", new()
        {
            Name = "my-app",
        });
    
        var exampleMagiclinkSettings = new Descope.MagiclinkSettings("example", new()
        {
            ProjectId = example.Id,
            ExpirationTime = "1 hour",
        });
    
        var examplePasswordSettings = new Descope.PasswordSettings("example", new()
        {
            ProjectId = example.Id,
            Lock = true,
            LockAttempts = 5,
            MinLength = 12,
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.descope.pulumi.descope.Project;
    import com.descope.pulumi.descope.ProjectArgs;
    import com.descope.pulumi.descope.MagiclinkSettings;
    import com.descope.pulumi.descope.MagiclinkSettingsArgs;
    import com.descope.pulumi.descope.PasswordSettings;
    import com.descope.pulumi.descope.PasswordSettingsArgs;
    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 example = new Project("example", ProjectArgs.builder()
                .name("my-app")
                .build());
    
            var exampleMagiclinkSettings = new MagiclinkSettings("exampleMagiclinkSettings", MagiclinkSettingsArgs.builder()
                .projectId(example.id())
                .expirationTime("1 hour")
                .build());
    
            var examplePasswordSettings = new PasswordSettings("examplePasswordSettings", PasswordSettingsArgs.builder()
                .projectId(example.id())
                .lock(true)
                .lockAttempts(5)
                .minLength(12)
                .build());
    
        }
    }
    
    resources:
      example:
        type: descope:Project
        properties:
          name: my-app
      exampleMagiclinkSettings:
        type: descope:MagiclinkSettings
        name: example
        properties:
          projectId: ${example.id}
          expirationTime: 1 hour
      examplePasswordSettings:
        type: descope:PasswordSettings
        name: example
        properties:
          projectId: ${example.id}
          lock: true
          lockAttempts: 5
          minLength: 12
    
    pulumi {
      required_providers {
        descope = {
          source = "pulumi/descope"
        }
      }
    }
    
    resource "descope_project" "example" {
      name = "my-app"
    }
    resource "descope_magiclinksettings" "example" {
      project_id      = descope_project.example.id
      expiration_time = "1 hour"
    }
    resource "descope_passwordsettings" "example" {
      project_id    = descope_project.example.id
      lock          = true
      lock_attempts = 5
      min_length    = 12
    }
    

    Roles and Permissions (RBAC)

    Roles and permissions are managed as standalone resources that reference the project by ID:

    import * as pulumi from "@pulumi/pulumi";
    import * as descope from "@descope/pulumi-descope";
    
    const example = new descope.Project("example", {name: "my-app"});
    const readData = new descope.Permission("read_data", {
        projectId: example.id,
        name: "read:data",
        description: "Read access to application data",
    });
    const writeData = new descope.Permission("write_data", {
        projectId: example.id,
        name: "write:data",
        description: "Write access to application data",
    });
    const adminPanel = new descope.Permission("admin_panel", {
        projectId: example.id,
        name: "admin:panel",
        description: "Access to the admin panel",
    });
    const viewer = new descope.Role("viewer", {
        projectId: example.id,
        name: "viewer",
        description: "Can read data",
        permissions: [readData.name],
    });
    const editor = new descope.Role("editor", {
        projectId: example.id,
        name: "editor",
        description: "Can read and write data",
        permissions: [
            readData.name,
            writeData.name,
        ],
    });
    const admin = new descope.Role("admin", {
        projectId: example.id,
        name: "admin",
        description: "Full access",
        permissions: [
            readData.name,
            writeData.name,
            adminPanel.name,
        ],
    });
    
    import pulumi
    import descope_pulumi as descope
    
    example = descope.Project("example", name="my-app")
    read_data = descope.Permission("read_data",
        project_id=example.id,
        name="read:data",
        description="Read access to application data")
    write_data = descope.Permission("write_data",
        project_id=example.id,
        name="write:data",
        description="Write access to application data")
    admin_panel = descope.Permission("admin_panel",
        project_id=example.id,
        name="admin:panel",
        description="Access to the admin panel")
    viewer = descope.Role("viewer",
        project_id=example.id,
        name="viewer",
        description="Can read data",
        permissions=[read_data.name])
    editor = descope.Role("editor",
        project_id=example.id,
        name="editor",
        description="Can read and write data",
        permissions=[
            read_data.name,
            write_data.name,
        ])
    admin = descope.Role("admin",
        project_id=example.id,
        name="admin",
        description="Full access",
        permissions=[
            read_data.name,
            write_data.name,
            admin_panel.name,
        ])
    
    package main
    
    import (
    	"github.com/descope/pulumi-descope/sdk/go/descope"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		example, err := descope.NewProject(ctx, "example", &descope.ProjectArgs{
    			Name: pulumi.String("my-app"),
    		})
    		if err != nil {
    			return err
    		}
    		readData, err := descope.NewPermission(ctx, "read_data", &descope.PermissionArgs{
    			ProjectId:   example.ID(),
    			Name:        pulumi.String("read:data"),
    			Description: pulumi.String("Read access to application data"),
    		})
    		if err != nil {
    			return err
    		}
    		writeData, err := descope.NewPermission(ctx, "write_data", &descope.PermissionArgs{
    			ProjectId:   example.ID(),
    			Name:        pulumi.String("write:data"),
    			Description: pulumi.String("Write access to application data"),
    		})
    		if err != nil {
    			return err
    		}
    		adminPanel, err := descope.NewPermission(ctx, "admin_panel", &descope.PermissionArgs{
    			ProjectId:   example.ID(),
    			Name:        pulumi.String("admin:panel"),
    			Description: pulumi.String("Access to the admin panel"),
    		})
    		if err != nil {
    			return err
    		}
    		_, err = descope.NewRole(ctx, "viewer", &descope.RoleArgs{
    			ProjectId:   example.ID(),
    			Name:        pulumi.String("viewer"),
    			Description: pulumi.String("Can read data"),
    			Permissions: pulumi.StringArray{
    				readData.Name,
    			},
    		})
    		if err != nil {
    			return err
    		}
    		_, err = descope.NewRole(ctx, "editor", &descope.RoleArgs{
    			ProjectId:   example.ID(),
    			Name:        pulumi.String("editor"),
    			Description: pulumi.String("Can read and write data"),
    			Permissions: pulumi.StringArray{
    				readData.Name,
    				writeData.Name,
    			},
    		})
    		if err != nil {
    			return err
    		}
    		_, err = descope.NewRole(ctx, "admin", &descope.RoleArgs{
    			ProjectId:   example.ID(),
    			Name:        pulumi.String("admin"),
    			Description: pulumi.String("Full access"),
    			Permissions: pulumi.StringArray{
    				readData.Name,
    				writeData.Name,
    				adminPanel.Name,
    			},
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Descope = Descope.Pulumi.Descope;
    
    return await Deployment.RunAsync(() => 
    {
        var example = new Descope.Project("example", new()
        {
            Name = "my-app",
        });
    
        var readData = new Descope.Permission("read_data", new()
        {
            ProjectId = example.Id,
            Name = "read:data",
            Description = "Read access to application data",
        });
    
        var writeData = new Descope.Permission("write_data", new()
        {
            ProjectId = example.Id,
            Name = "write:data",
            Description = "Write access to application data",
        });
    
        var adminPanel = new Descope.Permission("admin_panel", new()
        {
            ProjectId = example.Id,
            Name = "admin:panel",
            Description = "Access to the admin panel",
        });
    
        var viewer = new Descope.Role("viewer", new()
        {
            ProjectId = example.Id,
            Name = "viewer",
            Description = "Can read data",
            Permissions = new[]
            {
                readData.Name,
            },
        });
    
        var editor = new Descope.Role("editor", new()
        {
            ProjectId = example.Id,
            Name = "editor",
            Description = "Can read and write data",
            Permissions = new[]
            {
                readData.Name,
                writeData.Name,
            },
        });
    
        var admin = new Descope.Role("admin", new()
        {
            ProjectId = example.Id,
            Name = "admin",
            Description = "Full access",
            Permissions = new[]
            {
                readData.Name,
                writeData.Name,
                adminPanel.Name,
            },
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.descope.pulumi.descope.Project;
    import com.descope.pulumi.descope.ProjectArgs;
    import com.descope.pulumi.descope.Permission;
    import com.descope.pulumi.descope.PermissionArgs;
    import com.descope.pulumi.descope.Role;
    import com.descope.pulumi.descope.RoleArgs;
    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 example = new Project("example", ProjectArgs.builder()
                .name("my-app")
                .build());
    
            var readData = new Permission("readData", PermissionArgs.builder()
                .projectId(example.id())
                .name("read:data")
                .description("Read access to application data")
                .build());
    
            var writeData = new Permission("writeData", PermissionArgs.builder()
                .projectId(example.id())
                .name("write:data")
                .description("Write access to application data")
                .build());
    
            var adminPanel = new Permission("adminPanel", PermissionArgs.builder()
                .projectId(example.id())
                .name("admin:panel")
                .description("Access to the admin panel")
                .build());
    
            var viewer = new Role("viewer", RoleArgs.builder()
                .projectId(example.id())
                .name("viewer")
                .description("Can read data")
                .permissions(readData.name())
                .build());
    
            var editor = new Role("editor", RoleArgs.builder()
                .projectId(example.id())
                .name("editor")
                .description("Can read and write data")
                .permissions(            
                    readData.name(),
                    writeData.name())
                .build());
    
            var admin = new Role("admin", RoleArgs.builder()
                .projectId(example.id())
                .name("admin")
                .description("Full access")
                .permissions(            
                    readData.name(),
                    writeData.name(),
                    adminPanel.name())
                .build());
    
        }
    }
    
    resources:
      example:
        type: descope:Project
        properties:
          name: my-app
      readData:
        type: descope:Permission
        name: read_data
        properties:
          projectId: ${example.id}
          name: read:data
          description: Read access to application data
      writeData:
        type: descope:Permission
        name: write_data
        properties:
          projectId: ${example.id}
          name: write:data
          description: Write access to application data
      adminPanel:
        type: descope:Permission
        name: admin_panel
        properties:
          projectId: ${example.id}
          name: admin:panel
          description: Access to the admin panel
      viewer:
        type: descope:Role
        properties:
          projectId: ${example.id}
          name: viewer
          description: Can read data
          permissions:
            - ${readData.name}
      editor:
        type: descope:Role
        properties:
          projectId: ${example.id}
          name: editor
          description: Can read and write data
          permissions:
            - ${readData.name}
            - ${writeData.name}
      admin:
        type: descope:Role
        properties:
          projectId: ${example.id}
          name: admin
          description: Full access
          permissions:
            - ${readData.name}
            - ${writeData.name}
            - ${adminPanel.name}
    
    pulumi {
      required_providers {
        descope = {
          source = "pulumi/descope"
        }
      }
    }
    
    resource "descope_project" "example" {
      name = "my-app"
    }
    resource "descope_permission" "read_data" {
      project_id  = descope_project.example.id
      name        = "read:data"
      description = "Read access to application data"
    }
    resource "descope_permission" "write_data" {
      project_id  = descope_project.example.id
      name        = "write:data"
      description = "Write access to application data"
    }
    resource "descope_permission" "admin_panel" {
      project_id  = descope_project.example.id
      name        = "admin:panel"
      description = "Access to the admin panel"
    }
    resource "descope_role" "viewer" {
      project_id  = descope_project.example.id
      name        = "viewer"
      description = "Can read data"
      permissions = [descope_permission.read_data.name]
    }
    resource "descope_role" "editor" {
      project_id  = descope_project.example.id
      name        = "editor"
      description = "Can read and write data"
      permissions = [descope_permission.read_data.name, descope_permission.write_data.name]
    }
    resource "descope_role" "admin" {
      project_id  = descope_project.example.id
      name        = "admin"
      description = "Full access"
      permissions = [descope_permission.read_data.name, descope_permission.write_data.name, descope_permission.admin_panel.name]
    }
    

    Connectors

    Integrate with third-party services using standalone per-type connector resources:

    import * as pulumi from "@pulumi/pulumi";
    import * as descope from "@descope/pulumi-descope";
    
    const example = new descope.Project("example", {name: "my-app"});
    // Generic HTTP webhook with bearer token auth
    const eligibility = new descope.HttpConnector("eligibility", {
        projectId: example.id,
        name: "User Eligibility Check",
        description: "Checks if a new user is allowed to register",
        baseUrl: "https://api.example.com",
        authentication: {
            bearerToken: webhookSecret,
        },
    });
    // SendGrid for email delivery
    const email = new descope.SendgridConnector("email", {
        projectId: example.id,
        name: "Transactional Email",
        senderEmail: "noreply@example.com",
        senderName: "My App",
        apiKey: sendgridApiKey,
    });
    // Twilio for SMS OTP
    const sms = new descope.TwilioCoreConnector("sms", {
        projectId: example.id,
        name: "SMS OTP",
        accountSid: twilioAccountSid,
        fromPhone: "+15551234567",
        authToken: twilioAuthToken,
    });
    
    import pulumi
    import descope_pulumi as descope
    
    example = descope.Project("example", name="my-app")
    # Generic HTTP webhook with bearer token auth
    eligibility = descope.HttpConnector("eligibility",
        project_id=example.id,
        name="User Eligibility Check",
        description="Checks if a new user is allowed to register",
        base_url="https://api.example.com",
        authentication={
            "bearer_token": webhook_secret,
        })
    # SendGrid for email delivery
    email = descope.SendgridConnector("email",
        project_id=example.id,
        name="Transactional Email",
        sender_email="noreply@example.com",
        sender_name="My App",
        api_key=sendgrid_api_key)
    # Twilio for SMS OTP
    sms = descope.TwilioCoreConnector("sms",
        project_id=example.id,
        name="SMS OTP",
        account_sid=twilio_account_sid,
        from_phone="+15551234567",
        auth_token=twilio_auth_token)
    
    package main
    
    import (
    	"github.com/descope/pulumi-descope/sdk/go/descope"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		example, err := descope.NewProject(ctx, "example", &descope.ProjectArgs{
    			Name: pulumi.String("my-app"),
    		})
    		if err != nil {
    			return err
    		}
    		// Generic HTTP webhook with bearer token auth
    		_, err = descope.NewHttpConnector(ctx, "eligibility", &descope.HttpConnectorArgs{
    			ProjectId:   example.ID(),
    			Name:        pulumi.String("User Eligibility Check"),
    			Description: pulumi.String("Checks if a new user is allowed to register"),
    			BaseUrl:     pulumi.String("https://api.example.com"),
    			Authentication: &descope.HttpConnectorAuthenticationArgs{
    				BearerToken: pulumi.Any(webhookSecret),
    			},
    		})
    		if err != nil {
    			return err
    		}
    		// SendGrid for email delivery
    		_, err = descope.NewSendgridConnector(ctx, "email", &descope.SendgridConnectorArgs{
    			ProjectId:   example.ID(),
    			Name:        pulumi.String("Transactional Email"),
    			SenderEmail: pulumi.String("noreply@example.com"),
    			SenderName:  pulumi.String("My App"),
    			ApiKey:      pulumi.Any(sendgridApiKey),
    		})
    		if err != nil {
    			return err
    		}
    		// Twilio for SMS OTP
    		_, err = descope.NewTwilioCoreConnector(ctx, "sms", &descope.TwilioCoreConnectorArgs{
    			ProjectId:  example.ID(),
    			Name:       pulumi.String("SMS OTP"),
    			AccountSid: pulumi.Any(twilioAccountSid),
    			FromPhone:  pulumi.String("+15551234567"),
    			AuthToken:  pulumi.Any(twilioAuthToken),
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Descope = Descope.Pulumi.Descope;
    
    return await Deployment.RunAsync(() => 
    {
        var example = new Descope.Project("example", new()
        {
            Name = "my-app",
        });
    
        // Generic HTTP webhook with bearer token auth
        var eligibility = new Descope.HttpConnector("eligibility", new()
        {
            ProjectId = example.Id,
            Name = "User Eligibility Check",
            Description = "Checks if a new user is allowed to register",
            BaseUrl = "https://api.example.com",
            Authentication = new Descope.Inputs.HttpConnectorAuthenticationArgs
            {
                BearerToken = webhookSecret,
            },
        });
    
        // SendGrid for email delivery
        var email = new Descope.SendgridConnector("email", new()
        {
            ProjectId = example.Id,
            Name = "Transactional Email",
            SenderEmail = "noreply@example.com",
            SenderName = "My App",
            ApiKey = sendgridApiKey,
        });
    
        // Twilio for SMS OTP
        var sms = new Descope.TwilioCoreConnector("sms", new()
        {
            ProjectId = example.Id,
            Name = "SMS OTP",
            AccountSid = twilioAccountSid,
            FromPhone = "+15551234567",
            AuthToken = twilioAuthToken,
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.descope.pulumi.descope.Project;
    import com.descope.pulumi.descope.ProjectArgs;
    import com.descope.pulumi.descope.HttpConnector;
    import com.descope.pulumi.descope.HttpConnectorArgs;
    import com.pulumi.descope.inputs.HttpConnectorAuthenticationArgs;
    import com.descope.pulumi.descope.SendgridConnector;
    import com.descope.pulumi.descope.SendgridConnectorArgs;
    import com.descope.pulumi.descope.TwilioCoreConnector;
    import com.descope.pulumi.descope.TwilioCoreConnectorArgs;
    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 example = new Project("example", ProjectArgs.builder()
                .name("my-app")
                .build());
    
            // Generic HTTP webhook with bearer token auth
            var eligibility = new HttpConnector("eligibility", HttpConnectorArgs.builder()
                .projectId(example.id())
                .name("User Eligibility Check")
                .description("Checks if a new user is allowed to register")
                .baseUrl("https://api.example.com")
                .authentication(HttpConnectorAuthenticationArgs.builder()
                    .bearerToken(webhookSecret)
                    .build())
                .build());
    
            // SendGrid for email delivery
            var email = new SendgridConnector("email", SendgridConnectorArgs.builder()
                .projectId(example.id())
                .name("Transactional Email")
                .senderEmail("noreply@example.com")
                .senderName("My App")
                .apiKey(sendgridApiKey)
                .build());
    
            // Twilio for SMS OTP
            var sms = new TwilioCoreConnector("sms", TwilioCoreConnectorArgs.builder()
                .projectId(example.id())
                .name("SMS OTP")
                .accountSid(twilioAccountSid)
                .fromPhone("+15551234567")
                .authToken(twilioAuthToken)
                .build());
    
        }
    }
    
    resources:
      example:
        type: descope:Project
        properties:
          name: my-app
      # Generic HTTP webhook with bearer token auth
      eligibility:
        type: descope:HttpConnector
        properties:
          projectId: ${example.id}
          name: User Eligibility Check
          description: Checks if a new user is allowed to register
          baseUrl: https://api.example.com
          authentication:
            bearerToken: ${webhookSecret}
      # SendGrid for email delivery
      email:
        type: descope:SendgridConnector
        properties:
          projectId: ${example.id}
          name: Transactional Email
          senderEmail: noreply@example.com
          senderName: My App
          apiKey: ${sendgridApiKey}
      # Twilio for SMS OTP
      sms:
        type: descope:TwilioCoreConnector
        properties:
          projectId: ${example.id}
          name: SMS OTP
          accountSid: ${twilioAccountSid}
          fromPhone: '+15551234567'
          authToken: ${twilioAuthToken}
    
    pulumi {
      required_providers {
        descope = {
          source = "pulumi/descope"
        }
      }
    }
    
    resource "descope_project" "example" {
      name = "my-app"
    }
    # Generic HTTP webhook with bearer token auth
    resource "descope_httpconnector" "eligibility" {
      project_id  = descope_project.example.id
      name        = "User Eligibility Check"
      description = "Checks if a new user is allowed to register"
      base_url    = "https://api.example.com"
      authentication = {
        bearer_token = webhookSecret
      }
    }
    # SendGrid for email delivery
    resource "descope_sendgridconnector" "email" {
      project_id   = descope_project.example.id
      name         = "Transactional Email"
      sender_email = "noreply@example.com"
      sender_name  = "My App"
      api_key      = sendgridApiKey
    }
    # Twilio for SMS OTP
    resource "descope_twiliocoreconnector" "sms" {
      project_id  = descope_project.example.id
      name        = "SMS OTP"
      account_sid = twilioAccountSid
      from_phone  = "+15551234567"
      auth_token  = twilioAuthToken
    }
    

    Project and Session Settings

    General project settings, session behavior, and user invitations are managed with the standalone descope.ProjectSettings, descope.SessionSettings, and descope.InviteSettings resources:

    import * as pulumi from "@pulumi/pulumi";
    import * as descope from "@descope/pulumi-descope";
    
    const example = new descope.Project("example", {name: "my-app"});
    const exampleProjectSettings = new descope.ProjectSettings("example", {
        projectId: example.id,
        appUrl: "https://app.example.com",
        approvedDomains: [
            "example.com",
            "app.example.com",
        ],
    });
    const exampleSessionSettings = new descope.SessionSettings("example", {
        projectId: example.id,
        refreshTokenExpiration: "3 weeks",
        sessionTokenExpiration: "15 minutes",
        refreshTokenRotation: true,
        enableInactivity: true,
        inactivityTime: "30 minutes",
    });
    const exampleInviteSettings = new descope.InviteSettings("example", {
        projectId: example.id,
        requireInvitation: true,
        inviteUrl: "https://app.example.com/invite",
    });
    
    import pulumi
    import descope_pulumi as descope
    
    example = descope.Project("example", name="my-app")
    example_project_settings = descope.ProjectSettings("example",
        project_id=example.id,
        app_url="https://app.example.com",
        approved_domains=[
            "example.com",
            "app.example.com",
        ])
    example_session_settings = descope.SessionSettings("example",
        project_id=example.id,
        refresh_token_expiration="3 weeks",
        session_token_expiration="15 minutes",
        refresh_token_rotation=True,
        enable_inactivity=True,
        inactivity_time="30 minutes")
    example_invite_settings = descope.InviteSettings("example",
        project_id=example.id,
        require_invitation=True,
        invite_url="https://app.example.com/invite")
    
    package main
    
    import (
    	"github.com/descope/pulumi-descope/sdk/go/descope"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		example, err := descope.NewProject(ctx, "example", &descope.ProjectArgs{
    			Name: pulumi.String("my-app"),
    		})
    		if err != nil {
    			return err
    		}
    		_, err = descope.NewProjectSettings(ctx, "example", &descope.ProjectSettingsArgs{
    			ProjectId: example.ID(),
    			AppUrl:    pulumi.String("https://app.example.com"),
    			ApprovedDomains: pulumi.StringArray{
    				pulumi.String("example.com"),
    				pulumi.String("app.example.com"),
    			},
    		})
    		if err != nil {
    			return err
    		}
    		_, err = descope.NewSessionSettings(ctx, "example", &descope.SessionSettingsArgs{
    			ProjectId:              example.ID(),
    			RefreshTokenExpiration: pulumi.String("3 weeks"),
    			SessionTokenExpiration: pulumi.String("15 minutes"),
    			RefreshTokenRotation:   pulumi.Bool(true),
    			EnableInactivity:       pulumi.Bool(true),
    			InactivityTime:         pulumi.String("30 minutes"),
    		})
    		if err != nil {
    			return err
    		}
    		_, err = descope.NewInviteSettings(ctx, "example", &descope.InviteSettingsArgs{
    			ProjectId:         example.ID(),
    			RequireInvitation: pulumi.Bool(true),
    			InviteUrl:         pulumi.String("https://app.example.com/invite"),
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Descope = Descope.Pulumi.Descope;
    
    return await Deployment.RunAsync(() => 
    {
        var example = new Descope.Project("example", new()
        {
            Name = "my-app",
        });
    
        var exampleProjectSettings = new Descope.ProjectSettings("example", new()
        {
            ProjectId = example.Id,
            AppUrl = "https://app.example.com",
            ApprovedDomains = new[]
            {
                "example.com",
                "app.example.com",
            },
        });
    
        var exampleSessionSettings = new Descope.SessionSettings("example", new()
        {
            ProjectId = example.Id,
            RefreshTokenExpiration = "3 weeks",
            SessionTokenExpiration = "15 minutes",
            RefreshTokenRotation = true,
            EnableInactivity = true,
            InactivityTime = "30 minutes",
        });
    
        var exampleInviteSettings = new Descope.InviteSettings("example", new()
        {
            ProjectId = example.Id,
            RequireInvitation = true,
            InviteUrl = "https://app.example.com/invite",
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.descope.pulumi.descope.Project;
    import com.descope.pulumi.descope.ProjectArgs;
    import com.descope.pulumi.descope.ProjectSettings;
    import com.descope.pulumi.descope.ProjectSettingsArgs;
    import com.descope.pulumi.descope.SessionSettings;
    import com.descope.pulumi.descope.SessionSettingsArgs;
    import com.descope.pulumi.descope.InviteSettings;
    import com.descope.pulumi.descope.InviteSettingsArgs;
    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 example = new Project("example", ProjectArgs.builder()
                .name("my-app")
                .build());
    
            var exampleProjectSettings = new ProjectSettings("exampleProjectSettings", ProjectSettingsArgs.builder()
                .projectId(example.id())
                .appUrl("https://app.example.com")
                .approvedDomains(            
                    "example.com",
                    "app.example.com")
                .build());
    
            var exampleSessionSettings = new SessionSettings("exampleSessionSettings", SessionSettingsArgs.builder()
                .projectId(example.id())
                .refreshTokenExpiration("3 weeks")
                .sessionTokenExpiration("15 minutes")
                .refreshTokenRotation(true)
                .enableInactivity(true)
                .inactivityTime("30 minutes")
                .build());
    
            var exampleInviteSettings = new InviteSettings("exampleInviteSettings", InviteSettingsArgs.builder()
                .projectId(example.id())
                .requireInvitation(true)
                .inviteUrl("https://app.example.com/invite")
                .build());
    
        }
    }
    
    resources:
      example:
        type: descope:Project
        properties:
          name: my-app
      exampleProjectSettings:
        type: descope:ProjectSettings
        name: example
        properties:
          projectId: ${example.id}
          appUrl: https://app.example.com
          approvedDomains:
            - example.com
            - app.example.com
      exampleSessionSettings:
        type: descope:SessionSettings
        name: example
        properties:
          projectId: ${example.id}
          refreshTokenExpiration: 3 weeks
          sessionTokenExpiration: 15 minutes
          refreshTokenRotation: true
          enableInactivity: true
          inactivityTime: 30 minutes
      exampleInviteSettings:
        type: descope:InviteSettings
        name: example
        properties:
          projectId: ${example.id}
          requireInvitation: true
          inviteUrl: https://app.example.com/invite
    
    pulumi {
      required_providers {
        descope = {
          source = "pulumi/descope"
        }
      }
    }
    
    resource "descope_project" "example" {
      name = "my-app"
    }
    resource "descope_projectsettings" "example" {
      project_id       = descope_project.example.id
      app_url          = "https://app.example.com"
      approved_domains = ["example.com", "app.example.com"]
    }
    resource "descope_sessionsettings" "example" {
      project_id               = descope_project.example.id
      refresh_token_expiration = "3 weeks"
      session_token_expiration = "15 minutes"
      refresh_token_rotation   = true
      enable_inactivity        = true
      inactivity_time          = "30 minutes"
    }
    resource "descope_invitesettings" "example" {
      project_id         = descope_project.example.id
      require_invitation = true
      invite_url         = "https://app.example.com/invite"
    }
    

    Federated Applications

    Federated (SSO IdP) applications and their app-scoped roles and permissions are managed with the standalone descope.OidcApp, descope.SamlApp, descope.WsfedApp, descope.AppRole, and descope.AppPermission resources that reference the project by ID:

    import * as pulumi from "@pulumi/pulumi";
    import * as descope from "@descope/pulumi-descope";
    
    const example = new descope.Project("example", {name: "my-app"});
    const web = new descope.OidcApp("web", {
        projectId: example.id,
        name: "My Web App",
        description: "Primary web application",
        loginPageUrl: "https://app.example.com/login",
    });
    const readReports = new descope.AppPermission("read_reports", {
        projectId: example.id,
        appId: web.oidcAppId,
        name: "read:reports",
    });
    const analyst = new descope.AppRole("analyst", {
        projectId: example.id,
        appId: web.oidcAppId,
        name: "analyst",
        permissionIds: [readReports.id],
    });
    
    import pulumi
    import descope_pulumi as descope
    
    example = descope.Project("example", name="my-app")
    web = descope.OidcApp("web",
        project_id=example.id,
        name="My Web App",
        description="Primary web application",
        login_page_url="https://app.example.com/login")
    read_reports = descope.AppPermission("read_reports",
        project_id=example.id,
        app_id=web.oidc_app_id,
        name="read:reports")
    analyst = descope.AppRole("analyst",
        project_id=example.id,
        app_id=web.oidc_app_id,
        name="analyst",
        permission_ids=[read_reports.id])
    
    package main
    
    import (
    	"github.com/descope/pulumi-descope/sdk/go/descope"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		example, err := descope.NewProject(ctx, "example", &descope.ProjectArgs{
    			Name: pulumi.String("my-app"),
    		})
    		if err != nil {
    			return err
    		}
    		web, err := descope.NewOidcApp(ctx, "web", &descope.OidcAppArgs{
    			ProjectId:    example.ID(),
    			Name:         pulumi.String("My Web App"),
    			Description:  pulumi.String("Primary web application"),
    			LoginPageUrl: pulumi.String("https://app.example.com/login"),
    		})
    		if err != nil {
    			return err
    		}
    		readReports, err := descope.NewAppPermission(ctx, "read_reports", &descope.AppPermissionArgs{
    			ProjectId: example.ID(),
    			AppId:     web.OidcAppId,
    			Name:      pulumi.String("read:reports"),
    		})
    		if err != nil {
    			return err
    		}
    		_, err = descope.NewAppRole(ctx, "analyst", &descope.AppRoleArgs{
    			ProjectId: example.ID(),
    			AppId:     web.OidcAppId,
    			Name:      pulumi.String("analyst"),
    			PermissionIds: pulumi.StringArray{
    				readReports.ID(),
    			},
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Descope = Descope.Pulumi.Descope;
    
    return await Deployment.RunAsync(() => 
    {
        var example = new Descope.Project("example", new()
        {
            Name = "my-app",
        });
    
        var web = new Descope.OidcApp("web", new()
        {
            ProjectId = example.Id,
            Name = "My Web App",
            Description = "Primary web application",
            LoginPageUrl = "https://app.example.com/login",
        });
    
        var readReports = new Descope.AppPermission("read_reports", new()
        {
            ProjectId = example.Id,
            AppId = web.OidcAppId,
            Name = "read:reports",
        });
    
        var analyst = new Descope.AppRole("analyst", new()
        {
            ProjectId = example.Id,
            AppId = web.OidcAppId,
            Name = "analyst",
            PermissionIds = new[]
            {
                readReports.Id,
            },
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.descope.pulumi.descope.Project;
    import com.descope.pulumi.descope.ProjectArgs;
    import com.descope.pulumi.descope.OidcApp;
    import com.descope.pulumi.descope.OidcAppArgs;
    import com.descope.pulumi.descope.AppPermission;
    import com.descope.pulumi.descope.AppPermissionArgs;
    import com.descope.pulumi.descope.AppRole;
    import com.descope.pulumi.descope.AppRoleArgs;
    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 example = new Project("example", ProjectArgs.builder()
                .name("my-app")
                .build());
    
            var web = new OidcApp("web", OidcAppArgs.builder()
                .projectId(example.id())
                .name("My Web App")
                .description("Primary web application")
                .loginPageUrl("https://app.example.com/login")
                .build());
    
            var readReports = new AppPermission("readReports", AppPermissionArgs.builder()
                .projectId(example.id())
                .appId(web.oidcAppId())
                .name("read:reports")
                .build());
    
            var analyst = new AppRole("analyst", AppRoleArgs.builder()
                .projectId(example.id())
                .appId(web.oidcAppId())
                .name("analyst")
                .permissionIds(readReports.id())
                .build());
    
        }
    }
    
    resources:
      example:
        type: descope:Project
        properties:
          name: my-app
      web:
        type: descope:OidcApp
        properties:
          projectId: ${example.id}
          name: My Web App
          description: Primary web application
          loginPageUrl: https://app.example.com/login
      readReports:
        type: descope:AppPermission
        name: read_reports
        properties:
          projectId: ${example.id}
          appId: ${web.oidcAppId}
          name: read:reports
      analyst:
        type: descope:AppRole
        properties:
          projectId: ${example.id}
          appId: ${web.oidcAppId}
          name: analyst
          permissionIds:
            - ${readReports.id}
    
    pulumi {
      required_providers {
        descope = {
          source = "pulumi/descope"
        }
      }
    }
    
    resource "descope_project" "example" {
      name = "my-app"
    }
    resource "descope_oidcapp" "web" {
      project_id     = descope_project.example.id
      name           = "My Web App"
      description    = "Primary web application"
      login_page_url = "https://app.example.com/login"
    }
    resource "descope_apppermission" "read_reports" {
      project_id = descope_project.example.id
      app_id     = descope_oidcapp.web.oidc_app_id
      name       = "read:reports"
    }
    resource "descope_approle" "analyst" {
      project_id     = descope_project.example.id
      app_id         = descope_oidcapp.web.oidc_app_id
      name           = "analyst"
      permission_ids = [descope_apppermission.read_reports.id]
    }
    

    JWT Templates

    JWT templates are managed with the standalone descope.JwtTemplate resource that references the project by ID:

    import * as pulumi from "@pulumi/pulumi";
    import * as descope from "@descope/pulumi-descope";
    
    const example = new descope.Project("example", {name: "my-app"});
    const appClaims = new descope.JwtTemplate("app_claims", {
        projectId: example.id,
        name: "app-claims",
        description: "Adds subscription tier and org context to user JWTs",
        type: "user",
        template: JSON.stringify({
            tier: "@user.customAttributes.subscriptionTier",
            org_id: "@user.tenants[0].tenantId",
        }),
        excludePermissionClaim: true,
        addJtiClaim: true,
        overrideSubjectClaim: true,
    });
    
    import pulumi
    import descope_pulumi as descope
    import json
    
    example = descope.Project("example", name="my-app")
    app_claims = descope.JwtTemplate("app_claims",
        project_id=example.id,
        name="app-claims",
        description="Adds subscription tier and org context to user JWTs",
        type="user",
        template=json.dumps({
            "tier": "@user.customAttributes.subscriptionTier",
            "org_id": "@user.tenants[0].tenantId",
        }),
        exclude_permission_claim=True,
        add_jti_claim=True,
        override_subject_claim=True)
    
    package main
    
    import (
    	"encoding/json"
    
    	"github.com/descope/pulumi-descope/sdk/go/descope"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		example, err := descope.NewProject(ctx, "example", &descope.ProjectArgs{
    			Name: pulumi.String("my-app"),
    		})
    		if err != nil {
    			return err
    		}
    		tmpJSON0, err := json.Marshal(map[string]interface{}{
    			"tier":   "@user.customAttributes.subscriptionTier",
    			"org_id": "@user.tenants[0].tenantId",
    		})
    		if err != nil {
    			return err
    		}
    		json0 := string(tmpJSON0)
    		_, err = descope.NewJwtTemplate(ctx, "app_claims", &descope.JwtTemplateArgs{
    			ProjectId:              example.ID(),
    			Name:                   pulumi.String("app-claims"),
    			Description:            pulumi.String("Adds subscription tier and org context to user JWTs"),
    			Type:                   pulumi.String("user"),
    			Template:               pulumi.String(json0),
    			ExcludePermissionClaim: pulumi.Bool(true),
    			AddJtiClaim:            pulumi.Bool(true),
    			OverrideSubjectClaim:   pulumi.Bool(true),
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using System.Text.Json;
    using Pulumi;
    using Descope = Descope.Pulumi.Descope;
    
    return await Deployment.RunAsync(() => 
    {
        var example = new Descope.Project("example", new()
        {
            Name = "my-app",
        });
    
        var appClaims = new Descope.JwtTemplate("app_claims", new()
        {
            ProjectId = example.Id,
            Name = "app-claims",
            Description = "Adds subscription tier and org context to user JWTs",
            Type = "user",
            Template = JsonSerializer.Serialize(new Dictionary<string, object?>
            {
                ["tier"] = "@user.customAttributes.subscriptionTier",
                ["org_id"] = "@user.tenants[0].tenantId",
            }),
            ExcludePermissionClaim = true,
            AddJtiClaim = true,
            OverrideSubjectClaim = true,
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.descope.pulumi.descope.Project;
    import com.descope.pulumi.descope.ProjectArgs;
    import com.descope.pulumi.descope.JwtTemplate;
    import com.descope.pulumi.descope.JwtTemplateArgs;
    import static com.pulumi.codegen.internal.Serialization.*;
    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 example = new Project("example", ProjectArgs.builder()
                .name("my-app")
                .build());
    
            var appClaims = new JwtTemplate("appClaims", JwtTemplateArgs.builder()
                .projectId(example.id())
                .name("app-claims")
                .description("Adds subscription tier and org context to user JWTs")
                .type("user")
                .template(serializeJson(
                    jsonObject(
                        jsonProperty("tier", "@user.customAttributes.subscriptionTier"),
                        jsonProperty("org_id", "@user.tenants[0].tenantId")
                    )))
                .excludePermissionClaim(true)
                .addJtiClaim(true)
                .overrideSubjectClaim(true)
                .build());
    
        }
    }
    
    resources:
      example:
        type: descope:Project
        properties:
          name: my-app
      appClaims:
        type: descope:JwtTemplate
        name: app_claims
        properties:
          projectId: ${example.id}
          name: app-claims
          description: Adds subscription tier and org context to user JWTs
          type: user
          template:
            fn::toJSON:
              tier: '@user.customAttributes.subscriptionTier'
              org_id: '@user.tenants[0].tenantId'
          excludePermissionClaim: true # Add a unique JWT ID for replay attack prevention
          addJtiClaim: true # Move the user ID to a new dsub claim, allowing sub to be customized
          overrideSubjectClaim: true
    
    pulumi {
      required_providers {
        descope = {
          source = "pulumi/descope"
        }
      }
    }
    
    resource "descope_project" "example" {
      name = "my-app"
    }
    resource "descope_jwttemplate" "app_claims" {
      project_id  = descope_project.example.id
      name        = "app-claims"
      description = "Adds subscription tier and org context to user JWTs"
      type        = "user"
      template = jsonencode({
        "tier"   = "@user.customAttributes.subscriptionTier"
        "org_id" = "@user.tenants[0].tenantId"
      })
      exclude_permission_claim = true
      # Add a unique JWT ID for replay attack prevention
      add_jti_claim = true
      # Move the user ID to a new dsub claim, allowing sub to be customized
      override_subject_claim = true
    }
    

    SSO Settings

    Global settings for Single Sign-On across tenants are managed with the standalone descope.SsoSettings resource:

    import * as pulumi from "@pulumi/pulumi";
    import * as descope from "@descope/pulumi-descope";
    
    const example = new descope.Project("example", {name: "my-app"});
    const exampleSsoSettings = new descope.SsoSettings("example", {
        projectId: example.id,
        mergeUsers: true,
        allowOverrideRoles: true,
        mandatoryUserAttributes: [
            {
                id: "email",
            },
            {
                id: "name",
            },
            {
                id: "department",
                custom: true,
            },
        ],
        ssoSuiteSettings: {
            styleId: "my-brand-style",
            hideScim: false,
            hideSaml: false,
            hideOidc: false,
        },
    });
    
    import pulumi
    import descope_pulumi as descope
    
    example = descope.Project("example", name="my-app")
    example_sso_settings = descope.SsoSettings("example",
        project_id=example.id,
        merge_users=True,
        allow_override_roles=True,
        mandatory_user_attributes=[
            {
                "id": "email",
            },
            {
                "id": "name",
            },
            {
                "id": "department",
                "custom": True,
            },
        ],
        sso_suite_settings={
            "style_id": "my-brand-style",
            "hide_scim": False,
            "hide_saml": False,
            "hide_oidc": False,
        })
    
    package main
    
    import (
    	"github.com/descope/pulumi-descope/sdk/go/descope"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		example, err := descope.NewProject(ctx, "example", &descope.ProjectArgs{
    			Name: pulumi.String("my-app"),
    		})
    		if err != nil {
    			return err
    		}
    		_, err = descope.NewSsoSettings(ctx, "example", &descope.SsoSettingsArgs{
    			ProjectId:          example.ID(),
    			MergeUsers:         pulumi.Bool(true),
    			AllowOverrideRoles: pulumi.Bool(true),
    			MandatoryUserAttributes: descope.SsoSettingsMandatoryUserAttributeArray{
    				&descope.SsoSettingsMandatoryUserAttributeArgs{
    					Id: pulumi.String("email"),
    				},
    				&descope.SsoSettingsMandatoryUserAttributeArgs{
    					Id: pulumi.String("name"),
    				},
    				&descope.SsoSettingsMandatoryUserAttributeArgs{
    					Id:     pulumi.String("department"),
    					Custom: pulumi.Bool(true),
    				},
    			},
    			SsoSuiteSettings: &descope.SsoSettingsSsoSuiteSettingsArgs{
    				StyleId:  pulumi.String("my-brand-style"),
    				HideScim: pulumi.Bool(false),
    				HideSaml: pulumi.Bool(false),
    				HideOidc: pulumi.Bool(false),
    			},
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Descope = Descope.Pulumi.Descope;
    
    return await Deployment.RunAsync(() => 
    {
        var example = new Descope.Project("example", new()
        {
            Name = "my-app",
        });
    
        var exampleSsoSettings = new Descope.SsoSettings("example", new()
        {
            ProjectId = example.Id,
            MergeUsers = true,
            AllowOverrideRoles = true,
            MandatoryUserAttributes = new[]
            {
                new Descope.Inputs.SsoSettingsMandatoryUserAttributeArgs
                {
                    Id = "email",
                },
                new Descope.Inputs.SsoSettingsMandatoryUserAttributeArgs
                {
                    Id = "name",
                },
                new Descope.Inputs.SsoSettingsMandatoryUserAttributeArgs
                {
                    Id = "department",
                    Custom = true,
                },
            },
            SsoSuiteSettings = new Descope.Inputs.SsoSettingsSsoSuiteSettingsArgs
            {
                StyleId = "my-brand-style",
                HideScim = false,
                HideSaml = false,
                HideOidc = false,
            },
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.descope.pulumi.descope.Project;
    import com.descope.pulumi.descope.ProjectArgs;
    import com.descope.pulumi.descope.SsoSettings;
    import com.descope.pulumi.descope.SsoSettingsArgs;
    import com.pulumi.descope.inputs.SsoSettingsMandatoryUserAttributeArgs;
    import com.pulumi.descope.inputs.SsoSettingsSsoSuiteSettingsArgs;
    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 example = new Project("example", ProjectArgs.builder()
                .name("my-app")
                .build());
    
            var exampleSsoSettings = new SsoSettings("exampleSsoSettings", SsoSettingsArgs.builder()
                .projectId(example.id())
                .mergeUsers(true)
                .allowOverrideRoles(true)
                .mandatoryUserAttributes(            
                    SsoSettingsMandatoryUserAttributeArgs.builder()
                        .id("email")
                        .build(),
                    SsoSettingsMandatoryUserAttributeArgs.builder()
                        .id("name")
                        .build(),
                    SsoSettingsMandatoryUserAttributeArgs.builder()
                        .id("department")
                        .custom(true)
                        .build())
                .ssoSuiteSettings(SsoSettingsSsoSuiteSettingsArgs.builder()
                    .styleId("my-brand-style")
                    .hideScim(false)
                    .hideSaml(false)
                    .hideOidc(false)
                    .build())
                .build());
    
        }
    }
    
    resources:
      example:
        type: descope:Project
        properties:
          name: my-app
      exampleSsoSettings:
        type: descope:SsoSettings
        name: example
        properties:
          projectId: ${example.id}
          mergeUsers: true # Allow SSO roles to override a user's existing roles
          allowOverrideRoles: true # Define required Descope attributes when receiving SSO information
          mandatoryUserAttributes:
            - id: email
            - id: name
            - id: department
              custom: true
          ssoSuiteSettings:
            styleId: my-brand-style
            hideScim: false
            hideSaml: false
            hideOidc: false
    
    pulumi {
      required_providers {
        descope = {
          source = "pulumi/descope"
        }
      }
    }
    
    resource "descope_project" "example" {
      name = "my-app"
    }
    resource "descope_ssosettings" "example" {
      project_id  = descope_project.example.id
      merge_users = true
      # Allow SSO roles to override a user's existing roles
      allow_override_roles = true
      # Define required Descope attributes when receiving SSO information
      mandatory_user_attributes {
        id = "email"
      }
      mandatory_user_attributes {
        id = "name"
      }
      mandatory_user_attributes {
        id     = "department"
        custom = true
      }
      sso_suite_settings = {
        style_id  = "my-brand-style"
        hide_scim = false
        hide_saml = false
        hide_oidc = false
      }
    }
    

    Create Project Resource

    Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.

    Constructor syntax

    new Project(name: string, args?: ProjectArgs, opts?: CustomResourceOptions);
    @overload
    def Project(resource_name: str,
                args: Optional[ProjectArgs] = None,
                opts: Optional[ResourceOptions] = None)
    
    @overload
    def Project(resource_name: str,
                opts: Optional[ResourceOptions] = None,
                deletion_protection: Optional[bool] = None,
                environment: Optional[str] = None,
                name: Optional[str] = None,
                tags: Optional[Sequence[str]] = None)
    func NewProject(ctx *Context, name string, args *ProjectArgs, opts ...ResourceOption) (*Project, error)
    public Project(string name, ProjectArgs? args = null, CustomResourceOptions? opts = null)
    public Project(String name, ProjectArgs args)
    public Project(String name, ProjectArgs args, CustomResourceOptions options)
    
    type: descope:Project
    properties: # The arguments to resource properties.
    options: # Bag of options to control resource's behavior.
    
    
    resource "descope_project" "name" {
        # resource properties
    }

    Parameters

    name string
    The unique name of the resource.
    args ProjectArgs
    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 ProjectArgs
    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 ProjectArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args ProjectArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args ProjectArgs
    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 projectResource = new Descope.Project("projectResource", new()
    {
        DeletionProtection = false,
        Environment = "string",
        Name = "string",
        Tags = new[]
        {
            "string",
        },
    });
    
    example, err := descope.NewProject(ctx, "projectResource", &descope.ProjectArgs{
    	DeletionProtection: pulumi.Bool(false),
    	Environment:        pulumi.String("string"),
    	Name:               pulumi.String("string"),
    	Tags: pulumi.StringArray{
    		pulumi.String("string"),
    	},
    })
    
    resource "descope_project" "projectResource" {
      lifecycle {
        create_before_destroy = true
      }
      deletion_protection = false
      environment         = "string"
      name                = "string"
      tags                = ["string"]
    }
    
    var projectResource = new Project("projectResource", ProjectArgs.builder()
        .deletionProtection(false)
        .environment("string")
        .name("string")
        .tags("string")
        .build());
    
    project_resource = descope.Project("projectResource",
        deletion_protection=False,
        environment="string",
        name="string",
        tags=["string"])
    
    const projectResource = new descope.Project("projectResource", {
        deletionProtection: false,
        environment: "string",
        name: "string",
        tags: ["string"],
    });
    
    type: descope:Project
    properties:
        deletionProtection: false
        environment: string
        name: string
        tags:
            - string
    

    Project 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 Project resource accepts the following input properties:

    DeletionProtection bool
    Protects the project from being accidentally destroyed. When this attribute isn't set, deletion protection is enabled automatically for every project, whatever its environment attribute is set to. To destroy a protected project, set this attribute to false and apply the change first. Note that this only guards operations performed through this provider, so removing the resource from the Terraform state is not prevented.
    Environment string
    This can be set to production to mark production projects, otherwise this should be left unset for development or staging projects.
    Name string
    The name of the Descope project.
    Tags List<string>
    Descriptive tags for your Descope project. Each tag must be no more than 50 characters long.
    DeletionProtection bool
    Protects the project from being accidentally destroyed. When this attribute isn't set, deletion protection is enabled automatically for every project, whatever its environment attribute is set to. To destroy a protected project, set this attribute to false and apply the change first. Note that this only guards operations performed through this provider, so removing the resource from the Terraform state is not prevented.
    Environment string
    This can be set to production to mark production projects, otherwise this should be left unset for development or staging projects.
    Name string
    The name of the Descope project.
    Tags []string
    Descriptive tags for your Descope project. Each tag must be no more than 50 characters long.
    deletion_protection bool
    Protects the project from being accidentally destroyed. When this attribute isn't set, deletion protection is enabled automatically for every project, whatever its environment attribute is set to. To destroy a protected project, set this attribute to false and apply the change first. Note that this only guards operations performed through this provider, so removing the resource from the Terraform state is not prevented.
    environment string
    This can be set to production to mark production projects, otherwise this should be left unset for development or staging projects.
    name string
    The name of the Descope project.
    tags list(string)
    Descriptive tags for your Descope project. Each tag must be no more than 50 characters long.
    deletionProtection Boolean
    Protects the project from being accidentally destroyed. When this attribute isn't set, deletion protection is enabled automatically for every project, whatever its environment attribute is set to. To destroy a protected project, set this attribute to false and apply the change first. Note that this only guards operations performed through this provider, so removing the resource from the Terraform state is not prevented.
    environment String
    This can be set to production to mark production projects, otherwise this should be left unset for development or staging projects.
    name String
    The name of the Descope project.
    tags List<String>
    Descriptive tags for your Descope project. Each tag must be no more than 50 characters long.
    deletionProtection boolean
    Protects the project from being accidentally destroyed. When this attribute isn't set, deletion protection is enabled automatically for every project, whatever its environment attribute is set to. To destroy a protected project, set this attribute to false and apply the change first. Note that this only guards operations performed through this provider, so removing the resource from the Terraform state is not prevented.
    environment string
    This can be set to production to mark production projects, otherwise this should be left unset for development or staging projects.
    name string
    The name of the Descope project.
    tags string[]
    Descriptive tags for your Descope project. Each tag must be no more than 50 characters long.
    deletion_protection bool
    Protects the project from being accidentally destroyed. When this attribute isn't set, deletion protection is enabled automatically for every project, whatever its environment attribute is set to. To destroy a protected project, set this attribute to false and apply the change first. Note that this only guards operations performed through this provider, so removing the resource from the Terraform state is not prevented.
    environment str
    This can be set to production to mark production projects, otherwise this should be left unset for development or staging projects.
    name str
    The name of the Descope project.
    tags Sequence[str]
    Descriptive tags for your Descope project. Each tag must be no more than 50 characters long.
    deletionProtection Boolean
    Protects the project from being accidentally destroyed. When this attribute isn't set, deletion protection is enabled automatically for every project, whatever its environment attribute is set to. To destroy a protected project, set this attribute to false and apply the change first. Note that this only guards operations performed through this provider, so removing the resource from the Terraform state is not prevented.
    environment String
    This can be set to production to mark production projects, otherwise this should be left unset for development or staging projects.
    name String
    The name of the Descope project.
    tags List<String>
    Descriptive tags for your Descope project. Each tag must be no more than 50 characters long.

    Outputs

    All input properties are implicitly available as output properties. Additionally, the Project resource produces the following output properties:

    Id string
    The provider-assigned unique ID for this managed resource.
    Id string
    The provider-assigned unique ID for this managed resource.
    id string
    The provider-assigned unique ID for this managed resource.
    id String
    The provider-assigned unique ID for this managed resource.
    id string
    The provider-assigned unique ID for this managed resource.
    id str
    The provider-assigned unique ID for this managed resource.
    id String
    The provider-assigned unique ID for this managed resource.

    Look up Existing Project Resource

    Get an existing Project 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?: ProjectState, opts?: CustomResourceOptions): Project
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            deletion_protection: Optional[bool] = None,
            environment: Optional[str] = None,
            name: Optional[str] = None,
            tags: Optional[Sequence[str]] = None) -> Project
    func GetProject(ctx *Context, name string, id IDInput, state *ProjectState, opts ...ResourceOption) (*Project, error)
    public static Project Get(string name, Input<string> id, ProjectState? state, CustomResourceOptions? opts = null)
    public static Project get(String name, Output<String> id, ProjectState state, CustomResourceOptions options)
    resources:  existingProject:    type: descope:Project    get:      id: ${id}
    import {
      to = descope_project.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 ProjectState
    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 ProjectState
    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 ProjectState
    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 ProjectState
    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.
    The following state arguments are supported:
    DeletionProtection bool
    Protects the project from being accidentally destroyed. When this attribute isn't set, deletion protection is enabled automatically for every project, whatever its environment attribute is set to. To destroy a protected project, set this attribute to false and apply the change first. Note that this only guards operations performed through this provider, so removing the resource from the Terraform state is not prevented.
    Environment string
    This can be set to production to mark production projects, otherwise this should be left unset for development or staging projects.
    Name string
    The name of the Descope project.
    Tags List<string>
    Descriptive tags for your Descope project. Each tag must be no more than 50 characters long.
    DeletionProtection bool
    Protects the project from being accidentally destroyed. When this attribute isn't set, deletion protection is enabled automatically for every project, whatever its environment attribute is set to. To destroy a protected project, set this attribute to false and apply the change first. Note that this only guards operations performed through this provider, so removing the resource from the Terraform state is not prevented.
    Environment string
    This can be set to production to mark production projects, otherwise this should be left unset for development or staging projects.
    Name string
    The name of the Descope project.
    Tags []string
    Descriptive tags for your Descope project. Each tag must be no more than 50 characters long.
    deletion_protection bool
    Protects the project from being accidentally destroyed. When this attribute isn't set, deletion protection is enabled automatically for every project, whatever its environment attribute is set to. To destroy a protected project, set this attribute to false and apply the change first. Note that this only guards operations performed through this provider, so removing the resource from the Terraform state is not prevented.
    environment string
    This can be set to production to mark production projects, otherwise this should be left unset for development or staging projects.
    name string
    The name of the Descope project.
    tags list(string)
    Descriptive tags for your Descope project. Each tag must be no more than 50 characters long.
    deletionProtection Boolean
    Protects the project from being accidentally destroyed. When this attribute isn't set, deletion protection is enabled automatically for every project, whatever its environment attribute is set to. To destroy a protected project, set this attribute to false and apply the change first. Note that this only guards operations performed through this provider, so removing the resource from the Terraform state is not prevented.
    environment String
    This can be set to production to mark production projects, otherwise this should be left unset for development or staging projects.
    name String
    The name of the Descope project.
    tags List<String>
    Descriptive tags for your Descope project. Each tag must be no more than 50 characters long.
    deletionProtection boolean
    Protects the project from being accidentally destroyed. When this attribute isn't set, deletion protection is enabled automatically for every project, whatever its environment attribute is set to. To destroy a protected project, set this attribute to false and apply the change first. Note that this only guards operations performed through this provider, so removing the resource from the Terraform state is not prevented.
    environment string
    This can be set to production to mark production projects, otherwise this should be left unset for development or staging projects.
    name string
    The name of the Descope project.
    tags string[]
    Descriptive tags for your Descope project. Each tag must be no more than 50 characters long.
    deletion_protection bool
    Protects the project from being accidentally destroyed. When this attribute isn't set, deletion protection is enabled automatically for every project, whatever its environment attribute is set to. To destroy a protected project, set this attribute to false and apply the change first. Note that this only guards operations performed through this provider, so removing the resource from the Terraform state is not prevented.
    environment str
    This can be set to production to mark production projects, otherwise this should be left unset for development or staging projects.
    name str
    The name of the Descope project.
    tags Sequence[str]
    Descriptive tags for your Descope project. Each tag must be no more than 50 characters long.
    deletionProtection Boolean
    Protects the project from being accidentally destroyed. When this attribute isn't set, deletion protection is enabled automatically for every project, whatever its environment attribute is set to. To destroy a protected project, set this attribute to false and apply the change first. Note that this only guards operations performed through this provider, so removing the resource from the Terraform state is not prevented.
    environment String
    This can be set to production to mark production projects, otherwise this should be left unset for development or staging projects.
    name String
    The name of the Descope project.
    tags List<String>
    Descriptive tags for your Descope project. Each tag must be no more than 50 characters long.

    Package Details

    Repository
    descope descope/pulumi-descope
    License
    Apache-2.0
    Notes
    This Pulumi package is based on the descope Terraform Provider.
    descope logo Descope
    Viewing docs for Descope v1.0.1
    published on Sunday, Oct 11, 2026 by Descope

      Try Pulumi Cloud free.
      Your team will thank you.

      Start free trial