1. Registry
  2. Packages
  3. Mongodbatlas Provider
  4. API Docs
  5. getOrgDelegationSettings
Viewing docs for MongoDB Atlas v4.16.0
published on Thursday, Sep 17, 2026 by Pulumi
mongodbatlas logo mongodbatlas logo
Viewing docs for MongoDB Atlas v4.16.0
published on Thursday, Sep 17, 2026 by Pulumi

    mongodbatlas.OrgDelegationSettings describes the delegation settings of a MongoDB Atlas organization: how MCP (Model Context Protocol) and partner delegated access are permitted within the organization, as well as the refresh token lifetimes.

    Example Usage

    S

    import * as pulumi from "@pulumi/pulumi";
    import * as mongodbatlas from "@pulumi/mongodbatlas";
    
    const thisOrgDelegationSettings = new mongodbatlas.OrgDelegationSettings("this", {
        orgId: atlasOrgId,
        delegatedMcpAccess: "READ_ONLY",
        delegatedPartnerAccess: "DISALLOWED",
        idleRefreshTokenLifetime: 3600,
        maximumRefreshTokenLifetime: 86400,
    });
    const _this = mongodbatlas.getOrgDelegationSettingsOutput({
        orgId: thisOrgDelegationSettings.orgId,
    });
    export const orgDelegationSettingsDelegatedMcpAccess = thisOrgDelegationSettings.delegatedMcpAccess;
    export const orgDelegationSettingsDelegatedPartnerAccess = thisOrgDelegationSettings.delegatedPartnerAccess;
    export const orgDelegationSettingsIdleRefreshTokenLifetime = thisOrgDelegationSettings.idleRefreshTokenLifetime;
    export const orgDelegationSettingsMaximumRefreshTokenLifetime = thisOrgDelegationSettings.maximumRefreshTokenLifetime;
    export const orgDelegationSettingsDelegatedMcpAccessDs = _this.delegatedMcpAccess;
    
    import pulumi
    import pulumi_mongodbatlas as mongodbatlas
    
    this_org_delegation_settings = mongodbatlas.OrgDelegationSettings("this",
        org_id=atlas_org_id,
        delegated_mcp_access="READ_ONLY",
        delegated_partner_access="DISALLOWED",
        idle_refresh_token_lifetime=3600,
        maximum_refresh_token_lifetime=86400)
    this = mongodbatlas.get_org_delegation_settings_output(org_id=this_org_delegation_settings.org_id)
    pulumi.export("orgDelegationSettingsDelegatedMcpAccess", this_org_delegation_settings.delegated_mcp_access)
    pulumi.export("orgDelegationSettingsDelegatedPartnerAccess", this_org_delegation_settings.delegated_partner_access)
    pulumi.export("orgDelegationSettingsIdleRefreshTokenLifetime", this_org_delegation_settings.idle_refresh_token_lifetime)
    pulumi.export("orgDelegationSettingsMaximumRefreshTokenLifetime", this_org_delegation_settings.maximum_refresh_token_lifetime)
    pulumi.export("orgDelegationSettingsDelegatedMcpAccessDs", this.delegated_mcp_access)
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-mongodbatlas/sdk/v4/go/mongodbatlas"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		thisOrgDelegationSettings, err := mongodbatlas.NewOrgDelegationSettings(ctx, "this", &mongodbatlas.OrgDelegationSettingsArgs{
    			OrgId:                       pulumi.Any(atlasOrgId),
    			DelegatedMcpAccess:          pulumi.String("READ_ONLY"),
    			DelegatedPartnerAccess:      pulumi.String("DISALLOWED"),
    			IdleRefreshTokenLifetime:    pulumi.Int(3600),
    			MaximumRefreshTokenLifetime: pulumi.Int(86400),
    		})
    		if err != nil {
    			return err
    		}
    		this := mongodbatlas.GetOrgDelegationSettingsOutput(ctx, mongodbatlas.GetOrgDelegationSettingsOutputArgs{
    			OrgId: thisOrgDelegationSettings.OrgId,
    		}, nil)
    		ctx.Export("orgDelegationSettingsDelegatedMcpAccess", thisOrgDelegationSettings.DelegatedMcpAccess)
    		ctx.Export("orgDelegationSettingsDelegatedPartnerAccess", thisOrgDelegationSettings.DelegatedPartnerAccess)
    		ctx.Export("orgDelegationSettingsIdleRefreshTokenLifetime", thisOrgDelegationSettings.IdleRefreshTokenLifetime)
    		ctx.Export("orgDelegationSettingsMaximumRefreshTokenLifetime", thisOrgDelegationSettings.MaximumRefreshTokenLifetime)
    		ctx.Export("orgDelegationSettingsDelegatedMcpAccessDs", this.DelegatedMcpAccess())
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Mongodbatlas = Pulumi.Mongodbatlas;
    
    return await Deployment.RunAsync(() => 
    {
        var thisOrgDelegationSettings = new Mongodbatlas.OrgDelegationSettings("this", new()
        {
            OrgId = atlasOrgId,
            DelegatedMcpAccess = "READ_ONLY",
            DelegatedPartnerAccess = "DISALLOWED",
            IdleRefreshTokenLifetime = 3600,
            MaximumRefreshTokenLifetime = 86400,
        });
    
        var @this = Mongodbatlas.GetOrgDelegationSettings.Invoke(new()
        {
            OrgId = thisOrgDelegationSettings.OrgId,
        });
    
        return new Dictionary<string, object?>
        {
            ["orgDelegationSettingsDelegatedMcpAccess"] = thisOrgDelegationSettings.DelegatedMcpAccess,
            ["orgDelegationSettingsDelegatedPartnerAccess"] = thisOrgDelegationSettings.DelegatedPartnerAccess,
            ["orgDelegationSettingsIdleRefreshTokenLifetime"] = thisOrgDelegationSettings.IdleRefreshTokenLifetime,
            ["orgDelegationSettingsMaximumRefreshTokenLifetime"] = thisOrgDelegationSettings.MaximumRefreshTokenLifetime,
            ["orgDelegationSettingsDelegatedMcpAccessDs"] = @this.Apply(@this => @this.Apply(getOrgDelegationSettingsResult => getOrgDelegationSettingsResult.DelegatedMcpAccess)),
        };
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.mongodbatlas.OrgDelegationSettings;
    import com.pulumi.mongodbatlas.OrgDelegationSettingsArgs;
    import com.pulumi.mongodbatlas.MongodbatlasFunctions;
    import com.pulumi.mongodbatlas.inputs.GetOrgDelegationSettingsArgs;
    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 thisOrgDelegationSettings = new OrgDelegationSettings("thisOrgDelegationSettings", OrgDelegationSettingsArgs.builder()
                .orgId(atlasOrgId)
                .delegatedMcpAccess("READ_ONLY")
                .delegatedPartnerAccess("DISALLOWED")
                .idleRefreshTokenLifetime(3600)
                .maximumRefreshTokenLifetime(86400)
                .build());
    
            final var this = MongodbatlasFunctions.getOrgDelegationSettings(GetOrgDelegationSettingsArgs.builder()
                .orgId(thisOrgDelegationSettings.orgId())
                .build());
    
            ctx.export("orgDelegationSettingsDelegatedMcpAccess", thisOrgDelegationSettings.delegatedMcpAccess());
            ctx.export("orgDelegationSettingsDelegatedPartnerAccess", thisOrgDelegationSettings.delegatedPartnerAccess());
            ctx.export("orgDelegationSettingsIdleRefreshTokenLifetime", thisOrgDelegationSettings.idleRefreshTokenLifetime());
            ctx.export("orgDelegationSettingsMaximumRefreshTokenLifetime", thisOrgDelegationSettings.maximumRefreshTokenLifetime());
            ctx.export("orgDelegationSettingsDelegatedMcpAccessDs", this_.applyValue(_this_ -> _this_.delegatedMcpAccess()));
        }
    }
    
    resources:
      thisOrgDelegationSettings:
        type: mongodbatlas:OrgDelegationSettings
        name: this
        properties:
          orgId: ${atlasOrgId}
          delegatedMcpAccess: READ_ONLY
          delegatedPartnerAccess: DISALLOWED
          idleRefreshTokenLifetime: 3600
          maximumRefreshTokenLifetime: 86400
    variables:
      this:
        fn::invoke:
          function: mongodbatlas:getOrgDelegationSettings
          arguments:
            orgId: ${thisOrgDelegationSettings.orgId}
    outputs:
      orgDelegationSettingsDelegatedMcpAccess: ${thisOrgDelegationSettings.delegatedMcpAccess}
      orgDelegationSettingsDelegatedPartnerAccess: ${thisOrgDelegationSettings.delegatedPartnerAccess}
      orgDelegationSettingsIdleRefreshTokenLifetime: ${thisOrgDelegationSettings.idleRefreshTokenLifetime}
      orgDelegationSettingsMaximumRefreshTokenLifetime: ${thisOrgDelegationSettings.maximumRefreshTokenLifetime}
      orgDelegationSettingsDelegatedMcpAccessDs: ${this.delegatedMcpAccess}
    
    pulumi {
      required_providers {
        mongodbatlas = {
          source = "pulumi/mongodbatlas"
        }
      }
    }
    
    data "mongodbatlas_getorgdelegationsettings" "this" {
      org_id = mongodbatlas_orgdelegationsettings.this.org_id
    }
    
    resource "mongodbatlas_orgdelegationsettings" "this" {
      org_id                         = atlasOrgId
      delegated_mcp_access           = "READ_ONLY"
      delegated_partner_access       = "DISALLOWED"
      idle_refresh_token_lifetime    = 3600
      maximum_refresh_token_lifetime = 86400
    }
    output "orgDelegationSettingsDelegatedMcpAccess" {
      value = mongodbatlas_orgdelegationsettings.this.delegated_mcp_access
    }
    output "orgDelegationSettingsDelegatedPartnerAccess" {
      value = mongodbatlas_orgdelegationsettings.this.delegated_partner_access
    }
    output "orgDelegationSettingsIdleRefreshTokenLifetime" {
      value = mongodbatlas_orgdelegationsettings.this.idle_refresh_token_lifetime
    }
    output "orgDelegationSettingsMaximumRefreshTokenLifetime" {
      value = mongodbatlas_orgdelegationsettings.this.maximum_refresh_token_lifetime
    }
    output "orgDelegationSettingsDelegatedMcpAccessDs" {
      value = data.mongodbatlas_getorgdelegationsettings.this.delegated_mcp_access
    }
    

    Using getOrgDelegationSettings

    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 getOrgDelegationSettings(args: GetOrgDelegationSettingsArgs, opts?: InvokeOptions): Promise<GetOrgDelegationSettingsResult>
    function getOrgDelegationSettingsOutput(args: GetOrgDelegationSettingsOutputArgs, opts?: InvokeOutputOptions): Output<GetOrgDelegationSettingsResult>
    def get_org_delegation_settings(org_id: Optional[str] = None,
                                    opts: Optional[InvokeOptions] = None) -> GetOrgDelegationSettingsResult
    def get_org_delegation_settings_output(org_id: pulumi.Input[Optional[str]] = None,
                                    opts: Optional[InvokeOutputOptions] = None) -> Output[GetOrgDelegationSettingsResult]
    func LookupOrgDelegationSettings(ctx *Context, args *LookupOrgDelegationSettingsArgs, opts ...InvokeOption) (*LookupOrgDelegationSettingsResult, error)
    func LookupOrgDelegationSettingsOutput(ctx *Context, args *LookupOrgDelegationSettingsOutputArgs, opts ...InvokeOption) LookupOrgDelegationSettingsResultOutput

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

    public static class GetOrgDelegationSettings 
    {
        public static Task<GetOrgDelegationSettingsResult> InvokeAsync(GetOrgDelegationSettingsArgs args, InvokeOptions? opts = null)
        public static Output<GetOrgDelegationSettingsResult> Invoke(GetOrgDelegationSettingsInvokeArgs args, InvokeOptions? opts = null)
        public static Output<GetOrgDelegationSettingsResult> Invoke(GetOrgDelegationSettingsInvokeArgs args, InvokeOutputOptions opts)
    }
    public static CompletableFuture<GetOrgDelegationSettingsResult> getOrgDelegationSettings(GetOrgDelegationSettingsArgs args, InvokeOptions options)
    public static Output<GetOrgDelegationSettingsResult> getOrgDelegationSettings(GetOrgDelegationSettingsArgs args, InvokeOptions options)
    public static Output<GetOrgDelegationSettingsResult> getOrgDelegationSettings(GetOrgDelegationSettingsArgs args, InvokeOutputOptions options)
    
    fn::invoke:
      function: mongodbatlas:index/getOrgDelegationSettings:getOrgDelegationSettings
      arguments:
        # arguments dictionary
    data "mongodbatlas_get_org_delegation_settings" "name" {
        # arguments
    }

    The following arguments are supported:

    OrgId string
    Unique 24-hexadecimal digit string that identifies the organization that contains your projects.
    OrgId string
    Unique 24-hexadecimal digit string that identifies the organization that contains your projects.
    org_id string
    Unique 24-hexadecimal digit string that identifies the organization that contains your projects.
    orgId String
    Unique 24-hexadecimal digit string that identifies the organization that contains your projects.
    orgId string
    Unique 24-hexadecimal digit string that identifies the organization that contains your projects.
    org_id str
    Unique 24-hexadecimal digit string that identifies the organization that contains your projects.
    orgId String
    Unique 24-hexadecimal digit string that identifies the organization that contains your projects.

    getOrgDelegationSettings Result

    The following output properties are available:

    DelegatedMcpAccess string
    Policy that controls how MCP (Model Context Protocol) delegated access is permitted within this organization. Possible values are DISALLOWED, READ_ONLY, and READ_WRITE. Defaults to DISALLOWED.
    DelegatedPartnerAccess string
    Policy that controls whether partner delegated access is permitted within this organization. Possible values are DISALLOWED and READ_WRITE. Defaults to DISALLOWED.
    IdleRefreshTokenLifetime int
    Maximum number of seconds a refresh token may be idle before it expires. When not set, the system default applies.
    MaximumRefreshTokenLifetime int
    Maximum lifetime of a refresh token in seconds, regardless of activity. When not set, the system default applies.
    OrgId string
    Unique 24-hexadecimal digit string that identifies the organization that contains your projects.
    DelegatedMcpAccess string
    Policy that controls how MCP (Model Context Protocol) delegated access is permitted within this organization. Possible values are DISALLOWED, READ_ONLY, and READ_WRITE. Defaults to DISALLOWED.
    DelegatedPartnerAccess string
    Policy that controls whether partner delegated access is permitted within this organization. Possible values are DISALLOWED and READ_WRITE. Defaults to DISALLOWED.
    IdleRefreshTokenLifetime int
    Maximum number of seconds a refresh token may be idle before it expires. When not set, the system default applies.
    MaximumRefreshTokenLifetime int
    Maximum lifetime of a refresh token in seconds, regardless of activity. When not set, the system default applies.
    OrgId string
    Unique 24-hexadecimal digit string that identifies the organization that contains your projects.
    delegated_mcp_access string
    Policy that controls how MCP (Model Context Protocol) delegated access is permitted within this organization. Possible values are DISALLOWED, READ_ONLY, and READ_WRITE. Defaults to DISALLOWED.
    delegated_partner_access string
    Policy that controls whether partner delegated access is permitted within this organization. Possible values are DISALLOWED and READ_WRITE. Defaults to DISALLOWED.
    idle_refresh_token_lifetime number
    Maximum number of seconds a refresh token may be idle before it expires. When not set, the system default applies.
    maximum_refresh_token_lifetime number
    Maximum lifetime of a refresh token in seconds, regardless of activity. When not set, the system default applies.
    org_id string
    Unique 24-hexadecimal digit string that identifies the organization that contains your projects.
    delegatedMcpAccess String
    Policy that controls how MCP (Model Context Protocol) delegated access is permitted within this organization. Possible values are DISALLOWED, READ_ONLY, and READ_WRITE. Defaults to DISALLOWED.
    delegatedPartnerAccess String
    Policy that controls whether partner delegated access is permitted within this organization. Possible values are DISALLOWED and READ_WRITE. Defaults to DISALLOWED.
    idleRefreshTokenLifetime Integer
    Maximum number of seconds a refresh token may be idle before it expires. When not set, the system default applies.
    maximumRefreshTokenLifetime Integer
    Maximum lifetime of a refresh token in seconds, regardless of activity. When not set, the system default applies.
    orgId String
    Unique 24-hexadecimal digit string that identifies the organization that contains your projects.
    delegatedMcpAccess string
    Policy that controls how MCP (Model Context Protocol) delegated access is permitted within this organization. Possible values are DISALLOWED, READ_ONLY, and READ_WRITE. Defaults to DISALLOWED.
    delegatedPartnerAccess string
    Policy that controls whether partner delegated access is permitted within this organization. Possible values are DISALLOWED and READ_WRITE. Defaults to DISALLOWED.
    idleRefreshTokenLifetime number
    Maximum number of seconds a refresh token may be idle before it expires. When not set, the system default applies.
    maximumRefreshTokenLifetime number
    Maximum lifetime of a refresh token in seconds, regardless of activity. When not set, the system default applies.
    orgId string
    Unique 24-hexadecimal digit string that identifies the organization that contains your projects.
    delegated_mcp_access str
    Policy that controls how MCP (Model Context Protocol) delegated access is permitted within this organization. Possible values are DISALLOWED, READ_ONLY, and READ_WRITE. Defaults to DISALLOWED.
    delegated_partner_access str
    Policy that controls whether partner delegated access is permitted within this organization. Possible values are DISALLOWED and READ_WRITE. Defaults to DISALLOWED.
    idle_refresh_token_lifetime int
    Maximum number of seconds a refresh token may be idle before it expires. When not set, the system default applies.
    maximum_refresh_token_lifetime int
    Maximum lifetime of a refresh token in seconds, regardless of activity. When not set, the system default applies.
    org_id str
    Unique 24-hexadecimal digit string that identifies the organization that contains your projects.
    delegatedMcpAccess String
    Policy that controls how MCP (Model Context Protocol) delegated access is permitted within this organization. Possible values are DISALLOWED, READ_ONLY, and READ_WRITE. Defaults to DISALLOWED.
    delegatedPartnerAccess String
    Policy that controls whether partner delegated access is permitted within this organization. Possible values are DISALLOWED and READ_WRITE. Defaults to DISALLOWED.
    idleRefreshTokenLifetime Number
    Maximum number of seconds a refresh token may be idle before it expires. When not set, the system default applies.
    maximumRefreshTokenLifetime Number
    Maximum lifetime of a refresh token in seconds, regardless of activity. When not set, the system default applies.
    orgId String
    Unique 24-hexadecimal digit string that identifies the organization that contains your projects.

    Package Details

    Repository
    MongoDB Atlas pulumi/pulumi-mongodbatlas
    License
    Apache-2.0
    Notes
    This Pulumi package is based on the mongodbatlas Terraform Provider.
    mongodbatlas logo mongodbatlas logo
    Viewing docs for MongoDB Atlas v4.16.0
    published on Thursday, Sep 17, 2026 by Pulumi

      Try Pulumi Cloud free.
      Your team will thank you.

      Start free trial