1. Packages
  2. Azure Active Directory (Azure AD)
  3. API Docs
  4. ApplicationOwner
Azure Active Directory (Azure AD) v5.53.5 published on Tuesday, Oct 1, 2024 by Pulumi

azuread.ApplicationOwner

Explore with Pulumi AI

azuread logo
Azure Active Directory (Azure AD) v5.53.5 published on Tuesday, Oct 1, 2024 by Pulumi

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as azuread from "@pulumi/azuread";
    
    const example = new azuread.ApplicationRegistration("example", {displayName: "example"});
    const jane = new azuread.User("jane", {
        userPrincipalName: "jane.fischer@hashitown.com",
        displayName: "Jane Fischer",
        password: "Ch@ngeMe",
    });
    const exampleJane = new azuread.ApplicationOwner("example_jane", {
        applicationId: example.id,
        ownerObjectId: jane.objectId,
    });
    
    import pulumi
    import pulumi_azuread as azuread
    
    example = azuread.ApplicationRegistration("example", display_name="example")
    jane = azuread.User("jane",
        user_principal_name="jane.fischer@hashitown.com",
        display_name="Jane Fischer",
        password="Ch@ngeMe")
    example_jane = azuread.ApplicationOwner("example_jane",
        application_id=example.id,
        owner_object_id=jane.object_id)
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-azuread/sdk/v5/go/azuread"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		example, err := azuread.NewApplicationRegistration(ctx, "example", &azuread.ApplicationRegistrationArgs{
    			DisplayName: pulumi.String("example"),
    		})
    		if err != nil {
    			return err
    		}
    		jane, err := azuread.NewUser(ctx, "jane", &azuread.UserArgs{
    			UserPrincipalName: pulumi.String("jane.fischer@hashitown.com"),
    			DisplayName:       pulumi.String("Jane Fischer"),
    			Password:          pulumi.String("Ch@ngeMe"),
    		})
    		if err != nil {
    			return err
    		}
    		_, err = azuread.NewApplicationOwner(ctx, "example_jane", &azuread.ApplicationOwnerArgs{
    			ApplicationId: example.ID(),
    			OwnerObjectId: jane.ObjectId,
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using AzureAD = Pulumi.AzureAD;
    
    return await Deployment.RunAsync(() => 
    {
        var example = new AzureAD.ApplicationRegistration("example", new()
        {
            DisplayName = "example",
        });
    
        var jane = new AzureAD.User("jane", new()
        {
            UserPrincipalName = "jane.fischer@hashitown.com",
            DisplayName = "Jane Fischer",
            Password = "Ch@ngeMe",
        });
    
        var exampleJane = new AzureAD.ApplicationOwner("example_jane", new()
        {
            ApplicationId = example.Id,
            OwnerObjectId = jane.ObjectId,
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.azuread.ApplicationRegistration;
    import com.pulumi.azuread.ApplicationRegistrationArgs;
    import com.pulumi.azuread.User;
    import com.pulumi.azuread.UserArgs;
    import com.pulumi.azuread.ApplicationOwner;
    import com.pulumi.azuread.ApplicationOwnerArgs;
    import java.util.List;
    import java.util.ArrayList;
    import java.util.Map;
    import java.io.File;
    import java.nio.file.Files;
    import java.nio.file.Paths;
    
    public class App {
        public static void main(String[] args) {
            Pulumi.run(App::stack);
        }
    
        public static void stack(Context ctx) {
            var example = new ApplicationRegistration("example", ApplicationRegistrationArgs.builder()
                .displayName("example")
                .build());
    
            var jane = new User("jane", UserArgs.builder()
                .userPrincipalName("jane.fischer@hashitown.com")
                .displayName("Jane Fischer")
                .password("Ch@ngeMe")
                .build());
    
            var exampleJane = new ApplicationOwner("exampleJane", ApplicationOwnerArgs.builder()
                .applicationId(example.id())
                .ownerObjectId(jane.objectId())
                .build());
    
        }
    }
    
    resources:
      example:
        type: azuread:ApplicationRegistration
        properties:
          displayName: example
      jane:
        type: azuread:User
        properties:
          userPrincipalName: jane.fischer@hashitown.com
          displayName: Jane Fischer
          password: Ch@ngeMe
      exampleJane:
        type: azuread:ApplicationOwner
        name: example_jane
        properties:
          applicationId: ${example.id}
          ownerObjectId: ${jane.objectId}
    

    Tip For managing more application owners, create additional instances of this resource

    Create ApplicationOwner Resource

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

    Constructor syntax

    new ApplicationOwner(name: string, args: ApplicationOwnerArgs, opts?: CustomResourceOptions);
    @overload
    def ApplicationOwner(resource_name: str,
                         args: ApplicationOwnerArgs,
                         opts: Optional[ResourceOptions] = None)
    
    @overload
    def ApplicationOwner(resource_name: str,
                         opts: Optional[ResourceOptions] = None,
                         application_id: Optional[str] = None,
                         owner_object_id: Optional[str] = None)
    func NewApplicationOwner(ctx *Context, name string, args ApplicationOwnerArgs, opts ...ResourceOption) (*ApplicationOwner, error)
    public ApplicationOwner(string name, ApplicationOwnerArgs args, CustomResourceOptions? opts = null)
    public ApplicationOwner(String name, ApplicationOwnerArgs args)
    public ApplicationOwner(String name, ApplicationOwnerArgs args, CustomResourceOptions options)
    
    type: azuread:ApplicationOwner
    properties: # The arguments to resource properties.
    options: # Bag of options to control resource's behavior.
    
    

    Parameters

    name string
    The unique name of the resource.
    args ApplicationOwnerArgs
    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 ApplicationOwnerArgs
    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 ApplicationOwnerArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args ApplicationOwnerArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args ApplicationOwnerArgs
    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 applicationOwnerResource = new AzureAD.ApplicationOwner("applicationOwnerResource", new()
    {
        ApplicationId = "string",
        OwnerObjectId = "string",
    });
    
    example, err := azuread.NewApplicationOwner(ctx, "applicationOwnerResource", &azuread.ApplicationOwnerArgs{
    	ApplicationId: pulumi.String("string"),
    	OwnerObjectId: pulumi.String("string"),
    })
    
    var applicationOwnerResource = new ApplicationOwner("applicationOwnerResource", ApplicationOwnerArgs.builder()
        .applicationId("string")
        .ownerObjectId("string")
        .build());
    
    application_owner_resource = azuread.ApplicationOwner("applicationOwnerResource",
        application_id="string",
        owner_object_id="string")
    
    const applicationOwnerResource = new azuread.ApplicationOwner("applicationOwnerResource", {
        applicationId: "string",
        ownerObjectId: "string",
    });
    
    type: azuread:ApplicationOwner
    properties:
        applicationId: string
        ownerObjectId: string
    

    ApplicationOwner Resource Properties

    To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.

    Inputs

    The ApplicationOwner resource accepts the following input properties:

    ApplicationId string
    The resource ID of the application registration. Changing this forces a new resource to be created.
    OwnerObjectId string
    The object ID of the owner to assign to the application, typically a user or service principal. Changing this forces a new resource to be created.
    ApplicationId string
    The resource ID of the application registration. Changing this forces a new resource to be created.
    OwnerObjectId string
    The object ID of the owner to assign to the application, typically a user or service principal. Changing this forces a new resource to be created.
    applicationId String
    The resource ID of the application registration. Changing this forces a new resource to be created.
    ownerObjectId String
    The object ID of the owner to assign to the application, typically a user or service principal. Changing this forces a new resource to be created.
    applicationId string
    The resource ID of the application registration. Changing this forces a new resource to be created.
    ownerObjectId string
    The object ID of the owner to assign to the application, typically a user or service principal. Changing this forces a new resource to be created.
    application_id str
    The resource ID of the application registration. Changing this forces a new resource to be created.
    owner_object_id str
    The object ID of the owner to assign to the application, typically a user or service principal. Changing this forces a new resource to be created.
    applicationId String
    The resource ID of the application registration. Changing this forces a new resource to be created.
    ownerObjectId String
    The object ID of the owner to assign to the application, typically a user or service principal. Changing this forces a new resource to be created.

    Outputs

    All input properties are implicitly available as output properties. Additionally, the ApplicationOwner 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 str
    The provider-assigned unique ID for this managed resource.
    id String
    The provider-assigned unique ID for this managed resource.

    Look up Existing ApplicationOwner Resource

    Get an existing ApplicationOwner 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?: ApplicationOwnerState, opts?: CustomResourceOptions): ApplicationOwner
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            application_id: Optional[str] = None,
            owner_object_id: Optional[str] = None) -> ApplicationOwner
    func GetApplicationOwner(ctx *Context, name string, id IDInput, state *ApplicationOwnerState, opts ...ResourceOption) (*ApplicationOwner, error)
    public static ApplicationOwner Get(string name, Input<string> id, ApplicationOwnerState? state, CustomResourceOptions? opts = null)
    public static ApplicationOwner get(String name, Output<String> id, ApplicationOwnerState state, CustomResourceOptions options)
    Resource lookup is not supported in YAML
    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:
    ApplicationId string
    The resource ID of the application registration. Changing this forces a new resource to be created.
    OwnerObjectId string
    The object ID of the owner to assign to the application, typically a user or service principal. Changing this forces a new resource to be created.
    ApplicationId string
    The resource ID of the application registration. Changing this forces a new resource to be created.
    OwnerObjectId string
    The object ID of the owner to assign to the application, typically a user or service principal. Changing this forces a new resource to be created.
    applicationId String
    The resource ID of the application registration. Changing this forces a new resource to be created.
    ownerObjectId String
    The object ID of the owner to assign to the application, typically a user or service principal. Changing this forces a new resource to be created.
    applicationId string
    The resource ID of the application registration. Changing this forces a new resource to be created.
    ownerObjectId string
    The object ID of the owner to assign to the application, typically a user or service principal. Changing this forces a new resource to be created.
    application_id str
    The resource ID of the application registration. Changing this forces a new resource to be created.
    owner_object_id str
    The object ID of the owner to assign to the application, typically a user or service principal. Changing this forces a new resource to be created.
    applicationId String
    The resource ID of the application registration. Changing this forces a new resource to be created.
    ownerObjectId String
    The object ID of the owner to assign to the application, typically a user or service principal. Changing this forces a new resource to be created.

    Import

    Application Owners can be imported using the object ID of the application and the object ID of the owner, in the following format.

    $ pulumi import azuread:index/applicationOwner:ApplicationOwner example /applications/00000000-0000-0000-0000-000000000000/owners/11111111-1111-1111-1111-111111111111
    

    To learn more about importing existing cloud resources, see Importing resources.

    Package Details

    Repository
    Azure Active Directory (Azure AD) pulumi/pulumi-azuread
    License
    Apache-2.0
    Notes
    This Pulumi package is based on the azuread Terraform Provider.
    azuread logo
    Azure Active Directory (Azure AD) v5.53.5 published on Tuesday, Oct 1, 2024 by Pulumi