1. Packages
  2. Azure Active Directory (Azure AD)
  3. API Docs
  4. ApplicationOwner
Azure Active Directory (Azure AD) v6.4.0 published on Monday, Apr 7, 2025 by Pulumi

azuread.ApplicationOwner

Explore with Pulumi AI

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@example.com",
    displayName: "Jane Fischer",
    password: "Ch@ngeMe",
});
const exampleJane = new azuread.ApplicationOwner("example_jane", {
    applicationId: example.id,
    ownerObjectId: jane.objectId,
});
Copy
import pulumi
import pulumi_azuread as azuread

example = azuread.ApplicationRegistration("example", display_name="example")
jane = azuread.User("jane",
    user_principal_name="jane.fischer@example.com",
    display_name="Jane Fischer",
    password="Ch@ngeMe")
example_jane = azuread.ApplicationOwner("example_jane",
    application_id=example.id,
    owner_object_id=jane.object_id)
Copy
package main

import (
	"github.com/pulumi/pulumi-azuread/sdk/v6/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@example.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
	})
}
Copy
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@example.com",
        DisplayName = "Jane Fischer",
        Password = "Ch@ngeMe",
    });

    var exampleJane = new AzureAD.ApplicationOwner("example_jane", new()
    {
        ApplicationId = example.Id,
        OwnerObjectId = jane.ObjectId,
    });

});
Copy
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@example.com")
            .displayName("Jane Fischer")
            .password("Ch@ngeMe")
            .build());

        var exampleJane = new ApplicationOwner("exampleJane", ApplicationOwnerArgs.builder()
            .applicationId(example.id())
            .ownerObjectId(jane.objectId())
            .build());

    }
}
Copy
resources:
  example:
    type: azuread:ApplicationRegistration
    properties:
      displayName: example
  jane:
    type: azuread:User
    properties:
      userPrincipalName: jane.fischer@example.com
      displayName: Jane Fischer
      password: Ch@ngeMe
  exampleJane:
    type: azuread:ApplicationOwner
    name: example_jane
    properties:
      applicationId: ${example.id}
      ownerObjectId: ${jane.objectId}
Copy

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

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

In Python, inputs that are objects can be passed either as argument classes or as dictionary literals.

The ApplicationOwner resource accepts the following input properties:

ApplicationId
This property is required.
Changes to this property will trigger replacement.
string
The resource ID of the application registration. Changing this forces a new resource to be created.
OwnerObjectId
This property is required.
Changes to this property will trigger replacement.
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
This property is required.
Changes to this property will trigger replacement.
string
The resource ID of the application registration. Changing this forces a new resource to be created.
OwnerObjectId
This property is required.
Changes to this property will trigger replacement.
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
This property is required.
Changes to this property will trigger replacement.
String
The resource ID of the application registration. Changing this forces a new resource to be created.
ownerObjectId
This property is required.
Changes to this property will trigger replacement.
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
This property is required.
Changes to this property will trigger replacement.
string
The resource ID of the application registration. Changing this forces a new resource to be created.
ownerObjectId
This property is required.
Changes to this property will trigger replacement.
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
This property is required.
Changes to this property will trigger replacement.
str
The resource ID of the application registration. Changing this forces a new resource to be created.
owner_object_id
This property is required.
Changes to this property will trigger replacement.
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
This property is required.
Changes to this property will trigger replacement.
String
The resource ID of the application registration. Changing this forces a new resource to be created.
ownerObjectId
This property is required.
Changes to this property will trigger replacement.
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)
resources:  _:    type: azuread:ApplicationOwner    get:      id: ${id}
name This property is required.
The unique name of the resulting resource.
id This property is required.
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 This property is required.
The unique name of the resulting resource.
id This property is required.
The unique provider ID of the resource to lookup.
name This property is required.
The unique name of the resulting resource.
id This property is required.
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 This property is required.
The unique name of the resulting resource.
id This property is required.
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 This property is required.
The unique name of the resulting resource.
id This property is required.
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 Changes to this property will trigger replacement. string
The resource ID of the application registration. Changing this forces a new resource to be created.
OwnerObjectId Changes to this property will trigger replacement. 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 Changes to this property will trigger replacement. string
The resource ID of the application registration. Changing this forces a new resource to be created.
OwnerObjectId Changes to this property will trigger replacement. 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 Changes to this property will trigger replacement. String
The resource ID of the application registration. Changing this forces a new resource to be created.
ownerObjectId Changes to this property will trigger replacement. 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 Changes to this property will trigger replacement. string
The resource ID of the application registration. Changing this forces a new resource to be created.
ownerObjectId Changes to this property will trigger replacement. 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 Changes to this property will trigger replacement. str
The resource ID of the application registration. Changing this forces a new resource to be created.
owner_object_id Changes to this property will trigger replacement. 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 Changes to this property will trigger replacement. String
The resource ID of the application registration. Changing this forces a new resource to be created.
ownerObjectId Changes to this property will trigger replacement. 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
Copy

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.