1. Packages
  2. Packages
  3. Dynatrace
  4. API Docs
  5. Ms365EmailConnection
Viewing docs for Dynatrace v0.36.0
published on Tuesday, Jun 9, 2026 by Pulumiverse
dynatrace logo
Viewing docs for Dynatrace v0.36.0
published on Tuesday, Jun 9, 2026 by Pulumiverse

    This resource requires the API token scopes Read settings (settings.read) and Write settings (settings.write)

    This resource requires the OAuth scopes Read settings (settings:objects:read) and Write settings (settings:objects:write)

    Limitations

    Warning If a resource is created using an API token or without setting DYNATRACE_HTTP_OAUTH_PREFERENCE=true (when both are used), the settings object’s owner will remain empty.

    An empty owner implies:

    • The settings object becomes public, allowing other users with settings permissions to read and modify it.
    • Changing the settings object’s permissions will have no effect, meaning the dynatrace.SettingsPermissions resource can’t alter its access.

    When a settings object is created using platform credentials:

    • The owner is set to the owner of the OAuth client or platform token.
    • By default, the settings object is private; only the owner can read and modify it.
    • Access modifiers can be managed using the dynatrace.SettingsPermissions resource.

    We recommend using platform credentials to ensure a correct setup. In case an API token is needed, we recommend setting DYNATRACE_HTTP_OAUTH_PREFERENCE=true.

    Dynatrace Documentation

    • Microsoft 365 for Workflows - https://docs.dynatrace.com/docs/analyze-explore-automate/workflows/actions/microsoft365

    • Settings API - https://www.dynatrace.com/support/help/dynatrace-api/environment-api/settings (schemaId: app:dynatrace.microsoft365.connector:mail.connection)

    Export Example Usage

    • terraform-provider-dynatrace -export dynatrace.Ms365EmailConnection downloads all existing Microsoft 365 email connections

    The full documentation of the export feature is available here.

    Resource Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as dynatrace from "@pulumiverse/dynatrace";
    
    const connection = new dynatrace.Ms365EmailConnection("connection", {
        name: "#name#",
        type: "client_secret",
        tenantId: "00000000-0000-0000-0000-000000000000",
        clientId: "00000000-0000-0000-0000-000000000000",
        clientSecret: "######",
        fromAddress: "random.email@terraform.com",
    });
    
    import pulumi
    import pulumiverse_dynatrace as dynatrace
    
    connection = dynatrace.Ms365EmailConnection("connection",
        name="#name#",
        type="client_secret",
        tenant_id="00000000-0000-0000-0000-000000000000",
        client_id="00000000-0000-0000-0000-000000000000",
        client_secret="######",
        from_address="random.email@terraform.com")
    
    package main
    
    import (
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    	"github.com/pulumiverse/pulumi-dynatrace/sdk/go/dynatrace"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_, err := dynatrace.NewMs365EmailConnection(ctx, "connection", &dynatrace.Ms365EmailConnectionArgs{
    			Name:         pulumi.String("#name#"),
    			Type:         pulumi.String("client_secret"),
    			TenantId:     pulumi.String("00000000-0000-0000-0000-000000000000"),
    			ClientId:     pulumi.String("00000000-0000-0000-0000-000000000000"),
    			ClientSecret: pulumi.String("######"),
    			FromAddress:  pulumi.String("random.email@terraform.com"),
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Dynatrace = Pulumiverse.Dynatrace;
    
    return await Deployment.RunAsync(() => 
    {
        var connection = new Dynatrace.Ms365EmailConnection("connection", new()
        {
            Name = "#name#",
            Type = "client_secret",
            TenantId = "00000000-0000-0000-0000-000000000000",
            ClientId = "00000000-0000-0000-0000-000000000000",
            ClientSecret = "######",
            FromAddress = "random.email@terraform.com",
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.dynatrace.Ms365EmailConnection;
    import com.pulumi.dynatrace.Ms365EmailConnectionArgs;
    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 connection = new Ms365EmailConnection("connection", Ms365EmailConnectionArgs.builder()
                .name("#name#")
                .type("client_secret")
                .tenantId("00000000-0000-0000-0000-000000000000")
                .clientId("00000000-0000-0000-0000-000000000000")
                .clientSecret("######")
                .fromAddress("random.email@terraform.com")
                .build());
    
        }
    }
    
    resources:
      connection:
        type: dynatrace:Ms365EmailConnection
        properties:
          name: '#name#'
          type: client_secret
          tenantId: 00000000-0000-0000-0000-000000000000
          clientId: 00000000-0000-0000-0000-000000000000
          clientSecret: '######'
          fromAddress: random.email@terraform.com
    
    pulumi {
      required_providers {
        dynatrace = {
          source = "pulumi/dynatrace"
        }
      }
    }
    
    resource "dynatrace_ms365emailconnection" "connection" {
      name          = "#name#"
      type          = "client_secret"
      tenant_id     = "00000000-0000-0000-0000-000000000000"
      client_id     = "00000000-0000-0000-0000-000000000000"
      client_secret = "######"
      from_address  = "random.email@terraform.com"
    }
    

    Create Ms365EmailConnection Resource

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

    Constructor syntax

    new Ms365EmailConnection(name: string, args: Ms365EmailConnectionArgs, opts?: CustomResourceOptions);
    @overload
    def Ms365EmailConnection(resource_name: str,
                             args: Ms365EmailConnectionArgs,
                             opts: Optional[ResourceOptions] = None)
    
    @overload
    def Ms365EmailConnection(resource_name: str,
                             opts: Optional[ResourceOptions] = None,
                             client_id: Optional[str] = None,
                             from_address: Optional[str] = None,
                             tenant_id: Optional[str] = None,
                             type: Optional[str] = None,
                             client_secret: Optional[str] = None,
                             name: Optional[str] = None)
    func NewMs365EmailConnection(ctx *Context, name string, args Ms365EmailConnectionArgs, opts ...ResourceOption) (*Ms365EmailConnection, error)
    public Ms365EmailConnection(string name, Ms365EmailConnectionArgs args, CustomResourceOptions? opts = null)
    public Ms365EmailConnection(String name, Ms365EmailConnectionArgs args)
    public Ms365EmailConnection(String name, Ms365EmailConnectionArgs args, CustomResourceOptions options)
    
    type: dynatrace:Ms365EmailConnection
    properties: # The arguments to resource properties.
    options: # Bag of options to control resource's behavior.
    
    
    resource "dynatrace_ms365emailconnection" "name" {
        # resource properties
    }

    Parameters

    name string
    The unique name of the resource.
    args Ms365EmailConnectionArgs
    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 Ms365EmailConnectionArgs
    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 Ms365EmailConnectionArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args Ms365EmailConnectionArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args Ms365EmailConnectionArgs
    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 ms365EmailConnectionResource = new Dynatrace.Ms365EmailConnection("ms365EmailConnectionResource", new()
    {
        ClientId = "string",
        FromAddress = "string",
        TenantId = "string",
        Type = "string",
        ClientSecret = "string",
        Name = "string",
    });
    
    example, err := dynatrace.NewMs365EmailConnection(ctx, "ms365EmailConnectionResource", &dynatrace.Ms365EmailConnectionArgs{
    	ClientId:     pulumi.String("string"),
    	FromAddress:  pulumi.String("string"),
    	TenantId:     pulumi.String("string"),
    	Type:         pulumi.String("string"),
    	ClientSecret: pulumi.String("string"),
    	Name:         pulumi.String("string"),
    })
    
    resource "dynatrace_ms365emailconnection" "ms365EmailConnectionResource" {
      client_id     = "string"
      from_address  = "string"
      tenant_id     = "string"
      type          = "string"
      client_secret = "string"
      name          = "string"
    }
    
    var ms365EmailConnectionResource = new Ms365EmailConnection("ms365EmailConnectionResource", Ms365EmailConnectionArgs.builder()
        .clientId("string")
        .fromAddress("string")
        .tenantId("string")
        .type("string")
        .clientSecret("string")
        .name("string")
        .build());
    
    ms365_email_connection_resource = dynatrace.Ms365EmailConnection("ms365EmailConnectionResource",
        client_id="string",
        from_address="string",
        tenant_id="string",
        type="string",
        client_secret="string",
        name="string")
    
    const ms365EmailConnectionResource = new dynatrace.Ms365EmailConnection("ms365EmailConnectionResource", {
        clientId: "string",
        fromAddress: "string",
        tenantId: "string",
        type: "string",
        clientSecret: "string",
        name: "string",
    });
    
    type: dynatrace:Ms365EmailConnection
    properties:
        clientId: string
        clientSecret: string
        fromAddress: string
        name: string
        tenantId: string
        type: string
    

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

    ClientId string
    Application (client) ID of your app registered in Microsoft Azure App registrations
    FromAddress string
    The email address from which the messages will be sent
    TenantId string
    Directory (tenant) ID of your Azure Active Directory
    Type string
    Type of authentication method that should be used. Possible values: clientSecret
    ClientSecret string
    Client secret of your app registered in Microsoft Azure App registrations
    Name string
    A unique name for the Microsoft 365 email connection
    ClientId string
    Application (client) ID of your app registered in Microsoft Azure App registrations
    FromAddress string
    The email address from which the messages will be sent
    TenantId string
    Directory (tenant) ID of your Azure Active Directory
    Type string
    Type of authentication method that should be used. Possible values: clientSecret
    ClientSecret string
    Client secret of your app registered in Microsoft Azure App registrations
    Name string
    A unique name for the Microsoft 365 email connection
    client_id string
    Application (client) ID of your app registered in Microsoft Azure App registrations
    from_address string
    The email address from which the messages will be sent
    tenant_id string
    Directory (tenant) ID of your Azure Active Directory
    type string
    Type of authentication method that should be used. Possible values: clientSecret
    client_secret string
    Client secret of your app registered in Microsoft Azure App registrations
    name string
    A unique name for the Microsoft 365 email connection
    clientId String
    Application (client) ID of your app registered in Microsoft Azure App registrations
    fromAddress String
    The email address from which the messages will be sent
    tenantId String
    Directory (tenant) ID of your Azure Active Directory
    type String
    Type of authentication method that should be used. Possible values: clientSecret
    clientSecret String
    Client secret of your app registered in Microsoft Azure App registrations
    name String
    A unique name for the Microsoft 365 email connection
    clientId string
    Application (client) ID of your app registered in Microsoft Azure App registrations
    fromAddress string
    The email address from which the messages will be sent
    tenantId string
    Directory (tenant) ID of your Azure Active Directory
    type string
    Type of authentication method that should be used. Possible values: clientSecret
    clientSecret string
    Client secret of your app registered in Microsoft Azure App registrations
    name string
    A unique name for the Microsoft 365 email connection
    client_id str
    Application (client) ID of your app registered in Microsoft Azure App registrations
    from_address str
    The email address from which the messages will be sent
    tenant_id str
    Directory (tenant) ID of your Azure Active Directory
    type str
    Type of authentication method that should be used. Possible values: clientSecret
    client_secret str
    Client secret of your app registered in Microsoft Azure App registrations
    name str
    A unique name for the Microsoft 365 email connection
    clientId String
    Application (client) ID of your app registered in Microsoft Azure App registrations
    fromAddress String
    The email address from which the messages will be sent
    tenantId String
    Directory (tenant) ID of your Azure Active Directory
    type String
    Type of authentication method that should be used. Possible values: clientSecret
    clientSecret String
    Client secret of your app registered in Microsoft Azure App registrations
    name String
    A unique name for the Microsoft 365 email connection

    Outputs

    All input properties are implicitly available as output properties. Additionally, the Ms365EmailConnection 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 Ms365EmailConnection Resource

    Get an existing Ms365EmailConnection 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?: Ms365EmailConnectionState, opts?: CustomResourceOptions): Ms365EmailConnection
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            client_id: Optional[str] = None,
            client_secret: Optional[str] = None,
            from_address: Optional[str] = None,
            name: Optional[str] = None,
            tenant_id: Optional[str] = None,
            type: Optional[str] = None) -> Ms365EmailConnection
    func GetMs365EmailConnection(ctx *Context, name string, id IDInput, state *Ms365EmailConnectionState, opts ...ResourceOption) (*Ms365EmailConnection, error)
    public static Ms365EmailConnection Get(string name, Input<string> id, Ms365EmailConnectionState? state, CustomResourceOptions? opts = null)
    public static Ms365EmailConnection get(String name, Output<String> id, Ms365EmailConnectionState state, CustomResourceOptions options)
    resources:  _:    type: dynatrace:Ms365EmailConnection    get:      id: ${id}
    import {
      to = dynatrace_ms365emailconnection.example
      id = "${id}"
    }
    
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    resource_name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    The following state arguments are supported:
    ClientId string
    Application (client) ID of your app registered in Microsoft Azure App registrations
    ClientSecret string
    Client secret of your app registered in Microsoft Azure App registrations
    FromAddress string
    The email address from which the messages will be sent
    Name string
    A unique name for the Microsoft 365 email connection
    TenantId string
    Directory (tenant) ID of your Azure Active Directory
    Type string
    Type of authentication method that should be used. Possible values: clientSecret
    ClientId string
    Application (client) ID of your app registered in Microsoft Azure App registrations
    ClientSecret string
    Client secret of your app registered in Microsoft Azure App registrations
    FromAddress string
    The email address from which the messages will be sent
    Name string
    A unique name for the Microsoft 365 email connection
    TenantId string
    Directory (tenant) ID of your Azure Active Directory
    Type string
    Type of authentication method that should be used. Possible values: clientSecret
    client_id string
    Application (client) ID of your app registered in Microsoft Azure App registrations
    client_secret string
    Client secret of your app registered in Microsoft Azure App registrations
    from_address string
    The email address from which the messages will be sent
    name string
    A unique name for the Microsoft 365 email connection
    tenant_id string
    Directory (tenant) ID of your Azure Active Directory
    type string
    Type of authentication method that should be used. Possible values: clientSecret
    clientId String
    Application (client) ID of your app registered in Microsoft Azure App registrations
    clientSecret String
    Client secret of your app registered in Microsoft Azure App registrations
    fromAddress String
    The email address from which the messages will be sent
    name String
    A unique name for the Microsoft 365 email connection
    tenantId String
    Directory (tenant) ID of your Azure Active Directory
    type String
    Type of authentication method that should be used. Possible values: clientSecret
    clientId string
    Application (client) ID of your app registered in Microsoft Azure App registrations
    clientSecret string
    Client secret of your app registered in Microsoft Azure App registrations
    fromAddress string
    The email address from which the messages will be sent
    name string
    A unique name for the Microsoft 365 email connection
    tenantId string
    Directory (tenant) ID of your Azure Active Directory
    type string
    Type of authentication method that should be used. Possible values: clientSecret
    client_id str
    Application (client) ID of your app registered in Microsoft Azure App registrations
    client_secret str
    Client secret of your app registered in Microsoft Azure App registrations
    from_address str
    The email address from which the messages will be sent
    name str
    A unique name for the Microsoft 365 email connection
    tenant_id str
    Directory (tenant) ID of your Azure Active Directory
    type str
    Type of authentication method that should be used. Possible values: clientSecret
    clientId String
    Application (client) ID of your app registered in Microsoft Azure App registrations
    clientSecret String
    Client secret of your app registered in Microsoft Azure App registrations
    fromAddress String
    The email address from which the messages will be sent
    name String
    A unique name for the Microsoft 365 email connection
    tenantId String
    Directory (tenant) ID of your Azure Active Directory
    type String
    Type of authentication method that should be used. Possible values: clientSecret

    Package Details

    Repository
    dynatrace pulumiverse/pulumi-dynatrace
    License
    Apache-2.0
    Notes
    This Pulumi package is based on the dynatrace Terraform Provider.
    dynatrace logo
    Viewing docs for Dynatrace v0.36.0
    published on Tuesday, Jun 9, 2026 by Pulumiverse

      Try Pulumi Cloud free.
      Your team will thank you.

      Start free trial