getApplication

Use this data source to access information about an existing Application within Azure Active Directory.

NOTE: If you’re authenticating using a Service Principal then it must have permissions to both Read and write all (or owned by) applications and Sign in and read user profile within the Windows Azure Active Directory API.

Example Usage

using Pulumi;
using AzureAD = Pulumi.AzureAD;

class MyStack : Stack
{
    public MyStack()
    {
        var example = Output.Create(AzureAD.GetApplication.InvokeAsync(new AzureAD.GetApplicationArgs
        {
            DisplayName = "My First AzureAD Application",
        }));
        this.AzureAdObjectId = example.Apply(example => example.Id);
    }

    [Output("azureAdObjectId")]
    public Output<string> AzureAdObjectId { get; set; }
}
package main

import (
	"github.com/pulumi/pulumi-azuread/sdk/v4/go/azuread"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		opt0 := "My First AzureAD Application"
		example, err := azuread.LookupApplication(ctx, &azuread.LookupApplicationArgs{
			DisplayName: &opt0,
		}, nil)
		if err != nil {
			return err
		}
		ctx.Export("azureAdObjectId", example.Id)
		return nil
	})
}
import pulumi
import pulumi_azuread as azuread

example = azuread.get_application(display_name="My First AzureAD Application")
pulumi.export("azureAdObjectId", example.id)
import * as pulumi from "@pulumi/pulumi";
import * as azuread from "@pulumi/azuread";

const example = azuread.getApplication({
    displayName: "My First AzureAD Application",
});
export const azureAdObjectId = example.then(example => example.id);

Using getApplication

function getApplication(args: GetApplicationArgs, opts?: InvokeOptions): Promise<GetApplicationResult>
def get_application(application_id: Optional[str] = None,
                    display_name: Optional[str] = None,
                    name: Optional[str] = None,
                    oauth2_permissions: Optional[Sequence[GetApplicationOauth2Permission]] = None,
                    object_id: Optional[str] = None,
                    optional_claims: Optional[GetApplicationOptionalClaims] = None,
                    opts: Optional[InvokeOptions] = None) -> GetApplicationResult
func LookupApplication(ctx *Context, args *LookupApplicationArgs, opts ...InvokeOption) (*LookupApplicationResult, error)

Note: This function is named LookupApplication in the Go SDK.

public static class GetApplication {
    public static Task<GetApplicationResult> InvokeAsync(GetApplicationArgs args, InvokeOptions? opts = null)
}

The following arguments are supported:

ApplicationId string
Specifies the Application ID of the Azure Active Directory Application.
DisplayName string
Specifies the display name of the Application within Azure Active Directory.
Name string
The name of the optional claim.

Deprecated: This property has been renamed to display_name and will be removed in version 2.0 of this provider.

Oauth2Permissions List<Pulumi.AzureAD.Inputs.GetApplicationOauth2Permission>
A collection of OAuth 2.0 permission scopes that the web API (resource) app exposes to client apps. Each permission is covered by a oauth2_permission block as documented below.
ObjectId string
Specifies the Object ID of the Application within Azure Active Directory.
OptionalClaims Pulumi.AzureAD.Inputs.GetApplicationOptionalClaims
A collection of access_token or id_token blocks as documented below which list the optional claims configured for each token type. For more information see https://docs.microsoft.com/en-us/azure/active-directory/develop/active-directory-optional-claims
ApplicationId string
Specifies the Application ID of the Azure Active Directory Application.
DisplayName string
Specifies the display name of the Application within Azure Active Directory.
Name string
The name of the optional claim.

Deprecated: This property has been renamed to display_name and will be removed in version 2.0 of this provider.

Oauth2Permissions []GetApplicationOauth2Permission
A collection of OAuth 2.0 permission scopes that the web API (resource) app exposes to client apps. Each permission is covered by a oauth2_permission block as documented below.
ObjectId string
Specifies the Object ID of the Application within Azure Active Directory.
OptionalClaims GetApplicationOptionalClaims
A collection of access_token or id_token blocks as documented below which list the optional claims configured for each token type. For more information see https://docs.microsoft.com/en-us/azure/active-directory/develop/active-directory-optional-claims
applicationId string
Specifies the Application ID of the Azure Active Directory Application.
displayName string
Specifies the display name of the Application within Azure Active Directory.
name string
The name of the optional claim.

Deprecated: This property has been renamed to display_name and will be removed in version 2.0 of this provider.

oauth2Permissions GetApplicationOauth2Permission[]
A collection of OAuth 2.0 permission scopes that the web API (resource) app exposes to client apps. Each permission is covered by a oauth2_permission block as documented below.
objectId string
Specifies the Object ID of the Application within Azure Active Directory.
optionalClaims GetApplicationOptionalClaims
A collection of access_token or id_token blocks as documented below which list the optional claims configured for each token type. For more information see https://docs.microsoft.com/en-us/azure/active-directory/develop/active-directory-optional-claims
application_id str
Specifies the Application ID of the Azure Active Directory Application.
display_name str
Specifies the display name of the Application within Azure Active Directory.
name str
The name of the optional claim.

Deprecated: This property has been renamed to display_name and will be removed in version 2.0 of this provider.

oauth2_permissions Sequence[GetApplicationOauth2Permission]
A collection of OAuth 2.0 permission scopes that the web API (resource) app exposes to client apps. Each permission is covered by a oauth2_permission block as documented below.
object_id str
Specifies the Object ID of the Application within Azure Active Directory.
optional_claims GetApplicationOptionalClaims
A collection of access_token or id_token blocks as documented below which list the optional claims configured for each token type. For more information see https://docs.microsoft.com/en-us/azure/active-directory/develop/active-directory-optional-claims

getApplication Result

The following output properties are available:

AppRoles List<Pulumi.AzureAD.Outputs.GetApplicationAppRole>
A collection of app_role blocks as documented below. For more information https://docs.microsoft.com/en-us/azure/architecture/multitenant-identity/app-roles
ApplicationId string
the Application ID of the Azure Active Directory Application.
AvailableToOtherTenants bool
Is this Azure AD Application available to other tenants?
DisplayName string
Display name for the permission that appears in the admin consent and app assignment experiences.
GroupMembershipClaims string
The groups claim issued in a user or OAuth 2.0 access token that the app expects.
Homepage string
Id string
The provider-assigned unique ID for this managed resource.
IdentifierUris List<string>
A list of user-defined URI(s) that uniquely identify a Web application within it’s Azure AD tenant, or within a verified custom domain if the application is multi-tenant.
LogoutUrl string
The URL of the logout page.
Name string
The name of the optional claim.

Deprecated: This property has been renamed to display_name and will be removed in version 2.0 of this provider.

Oauth2AllowImplicitFlow bool
Does this Azure AD Application allow OAuth2.0 implicit flow tokens?
Oauth2Permissions List<Pulumi.AzureAD.Outputs.GetApplicationOauth2Permission>
A collection of OAuth 2.0 permission scopes that the web API (resource) app exposes to client apps. Each permission is covered by a oauth2_permission block as documented below.
ObjectId string
the Object ID of the Azure Active Directory Application.
Owners List<string>
A list of User Object IDs that are assigned ownership of the application registration.
ReplyUrls List<string>
A list of URLs that user tokens are sent to for sign in, or the redirect URIs that OAuth 2.0 authorization codes and access tokens are sent to.
RequiredResourceAccesses List<Pulumi.AzureAD.Outputs.GetApplicationRequiredResourceAccess>
A collection of required_resource_access blocks as documented below.
Type string
Specifies whether the id property references an OAuth2Permission or an AppRole.
OptionalClaims Pulumi.AzureAD.Outputs.GetApplicationOptionalClaims
A collection of access_token or id_token blocks as documented below which list the optional claims configured for each token type. For more information see https://docs.microsoft.com/en-us/azure/active-directory/develop/active-directory-optional-claims
AppRoles []GetApplicationAppRoleType
A collection of app_role blocks as documented below. For more information https://docs.microsoft.com/en-us/azure/architecture/multitenant-identity/app-roles
ApplicationId string
the Application ID of the Azure Active Directory Application.
AvailableToOtherTenants bool
Is this Azure AD Application available to other tenants?
DisplayName string
Display name for the permission that appears in the admin consent and app assignment experiences.
GroupMembershipClaims string
The groups claim issued in a user or OAuth 2.0 access token that the app expects.
Homepage string
Id string
The provider-assigned unique ID for this managed resource.
IdentifierUris []string
A list of user-defined URI(s) that uniquely identify a Web application within it’s Azure AD tenant, or within a verified custom domain if the application is multi-tenant.
LogoutUrl string
The URL of the logout page.
Name string
The name of the optional claim.

Deprecated: This property has been renamed to display_name and will be removed in version 2.0 of this provider.

Oauth2AllowImplicitFlow bool
Does this Azure AD Application allow OAuth2.0 implicit flow tokens?
Oauth2Permissions []GetApplicationOauth2Permission
A collection of OAuth 2.0 permission scopes that the web API (resource) app exposes to client apps. Each permission is covered by a oauth2_permission block as documented below.
ObjectId string
the Object ID of the Azure Active Directory Application.
Owners []string
A list of User Object IDs that are assigned ownership of the application registration.
ReplyUrls []string
A list of URLs that user tokens are sent to for sign in, or the redirect URIs that OAuth 2.0 authorization codes and access tokens are sent to.
RequiredResourceAccesses []GetApplicationRequiredResourceAccess
A collection of required_resource_access blocks as documented below.
Type string
Specifies whether the id property references an OAuth2Permission or an AppRole.
OptionalClaims GetApplicationOptionalClaims
A collection of access_token or id_token blocks as documented below which list the optional claims configured for each token type. For more information see https://docs.microsoft.com/en-us/azure/active-directory/develop/active-directory-optional-claims
appRoles GetApplicationAppRole[]
A collection of app_role blocks as documented below. For more information https://docs.microsoft.com/en-us/azure/architecture/multitenant-identity/app-roles
applicationId string
the Application ID of the Azure Active Directory Application.
availableToOtherTenants boolean
Is this Azure AD Application available to other tenants?
displayName string
Display name for the permission that appears in the admin consent and app assignment experiences.
groupMembershipClaims string
The groups claim issued in a user or OAuth 2.0 access token that the app expects.
homepage string
id string
The provider-assigned unique ID for this managed resource.
identifierUris string[]
A list of user-defined URI(s) that uniquely identify a Web application within it’s Azure AD tenant, or within a verified custom domain if the application is multi-tenant.
logoutUrl string
The URL of the logout page.
name string
The name of the optional claim.

Deprecated: This property has been renamed to display_name and will be removed in version 2.0 of this provider.

oauth2AllowImplicitFlow boolean
Does this Azure AD Application allow OAuth2.0 implicit flow tokens?
oauth2Permissions GetApplicationOauth2Permission[]
A collection of OAuth 2.0 permission scopes that the web API (resource) app exposes to client apps. Each permission is covered by a oauth2_permission block as documented below.
objectId string
the Object ID of the Azure Active Directory Application.
owners string[]
A list of User Object IDs that are assigned ownership of the application registration.
replyUrls string[]
A list of URLs that user tokens are sent to for sign in, or the redirect URIs that OAuth 2.0 authorization codes and access tokens are sent to.
requiredResourceAccesses GetApplicationRequiredResourceAccess[]
A collection of required_resource_access blocks as documented below.
type string
Specifies whether the id property references an OAuth2Permission or an AppRole.
optionalClaims GetApplicationOptionalClaims
A collection of access_token or id_token blocks as documented below which list the optional claims configured for each token type. For more information see https://docs.microsoft.com/en-us/azure/active-directory/develop/active-directory-optional-claims
app_roles Sequence[GetApplicationAppRole]
A collection of app_role blocks as documented below. For more information https://docs.microsoft.com/en-us/azure/architecture/multitenant-identity/app-roles
application_id str
the Application ID of the Azure Active Directory Application.
available_to_other_tenants bool
Is this Azure AD Application available to other tenants?
display_name str
Display name for the permission that appears in the admin consent and app assignment experiences.
group_membership_claims str
The groups claim issued in a user or OAuth 2.0 access token that the app expects.
homepage str
id str
The provider-assigned unique ID for this managed resource.
identifier_uris Sequence[str]
A list of user-defined URI(s) that uniquely identify a Web application within it’s Azure AD tenant, or within a verified custom domain if the application is multi-tenant.
logout_url str
The URL of the logout page.
name str
The name of the optional claim.

Deprecated: This property has been renamed to display_name and will be removed in version 2.0 of this provider.

oauth2_allow_implicit_flow bool
Does this Azure AD Application allow OAuth2.0 implicit flow tokens?
oauth2_permissions Sequence[GetApplicationOauth2Permission]
A collection of OAuth 2.0 permission scopes that the web API (resource) app exposes to client apps. Each permission is covered by a oauth2_permission block as documented below.
object_id str
the Object ID of the Azure Active Directory Application.
owners Sequence[str]
A list of User Object IDs that are assigned ownership of the application registration.
reply_urls Sequence[str]
A list of URLs that user tokens are sent to for sign in, or the redirect URIs that OAuth 2.0 authorization codes and access tokens are sent to.
required_resource_accesses Sequence[GetApplicationRequiredResourceAccess]
A collection of required_resource_access blocks as documented below.
type str
Specifies whether the id property references an OAuth2Permission or an AppRole.
optional_claims GetApplicationOptionalClaims
A collection of access_token or id_token blocks as documented below which list the optional claims configured for each token type. For more information see https://docs.microsoft.com/en-us/azure/active-directory/develop/active-directory-optional-claims

Supporting Types

GetApplicationAppRole

AllowedMemberTypes List<string>
Specifies whether this app role definition can be assigned to users and groups, or to other applications (that are accessing this application in daemon service scenarios). Possible values are: User and Application, or both.
Description string
Permission help text that appears in the admin app assignment and consent experiences.
DisplayName string
Specifies the display name of the Application within Azure Active Directory.
Id string
The unique identifier for one of the OAuth2Permission or AppRole instances that the resource application exposes.
IsEnabled bool
Is this permission enabled?
Value string
The name of this permission
AllowedMemberTypes []string
Specifies whether this app role definition can be assigned to users and groups, or to other applications (that are accessing this application in daemon service scenarios). Possible values are: User and Application, or both.
Description string
Permission help text that appears in the admin app assignment and consent experiences.
DisplayName string
Specifies the display name of the Application within Azure Active Directory.
Id string
The unique identifier for one of the OAuth2Permission or AppRole instances that the resource application exposes.
IsEnabled bool
Is this permission enabled?
Value string
The name of this permission
allowedMemberTypes string[]
Specifies whether this app role definition can be assigned to users and groups, or to other applications (that are accessing this application in daemon service scenarios). Possible values are: User and Application, or both.
description string
Permission help text that appears in the admin app assignment and consent experiences.
displayName string
Specifies the display name of the Application within Azure Active Directory.
id string
The unique identifier for one of the OAuth2Permission or AppRole instances that the resource application exposes.
isEnabled boolean
Is this permission enabled?
value string
The name of this permission
allowed_member_types Sequence[str]
Specifies whether this app role definition can be assigned to users and groups, or to other applications (that are accessing this application in daemon service scenarios). Possible values are: User and Application, or both.
description str
Permission help text that appears in the admin app assignment and consent experiences.
display_name str
Specifies the display name of the Application within Azure Active Directory.
id str
The unique identifier for one of the OAuth2Permission or AppRole instances that the resource application exposes.
is_enabled bool
Is this permission enabled?
value str
The name of this permission

GetApplicationOauth2Permission

AdminConsentDescription string
The description of the admin consent
AdminConsentDisplayName string
The display name of the admin consent
Id string
The unique identifier for one of the OAuth2Permission or AppRole instances that the resource application exposes.
IsEnabled bool
Is this permission enabled?
Type string
Specifies whether the id property references an OAuth2Permission or an AppRole.
UserConsentDescription string
The description of the user consent
UserConsentDisplayName string
The display name of the user consent
Value string
The name of this permission
AdminConsentDescription string
The description of the admin consent
AdminConsentDisplayName string
The display name of the admin consent
Id string
The unique identifier for one of the OAuth2Permission or AppRole instances that the resource application exposes.
IsEnabled bool
Is this permission enabled?
Type string
Specifies whether the id property references an OAuth2Permission or an AppRole.
UserConsentDescription string
The description of the user consent
UserConsentDisplayName string
The display name of the user consent
Value string
The name of this permission
adminConsentDescription string
The description of the admin consent
adminConsentDisplayName string
The display name of the admin consent
id string
The unique identifier for one of the OAuth2Permission or AppRole instances that the resource application exposes.
isEnabled boolean
Is this permission enabled?
type string
Specifies whether the id property references an OAuth2Permission or an AppRole.
userConsentDescription string
The description of the user consent
userConsentDisplayName string
The display name of the user consent
value string
The name of this permission
admin_consent_description str
The description of the admin consent
admin_consent_display_name str
The display name of the admin consent
id str
The unique identifier for one of the OAuth2Permission or AppRole instances that the resource application exposes.
is_enabled bool
Is this permission enabled?
type str
Specifies whether the id property references an OAuth2Permission or an AppRole.
user_consent_description str
The description of the user consent
user_consent_display_name str
The display name of the user consent
value str
The name of this permission

GetApplicationOptionalClaims

GetApplicationOptionalClaimsAccessToken

Name string
The name of the optional claim.
AdditionalProperties List<string>
List of Additional Properties of the claim. If a property exists in this list, it modifies the behaviour of the optional claim.
Essential bool
Whether the claim specified by the client is necessary to ensure a smooth authorization experience.
Source string
The source of the claim. If source is absent, the claim is a predefined optional claim. If source is user, the value of name is the extension property from the user object.
Name string
The name of the optional claim.
AdditionalProperties []string
List of Additional Properties of the claim. If a property exists in this list, it modifies the behaviour of the optional claim.
Essential bool
Whether the claim specified by the client is necessary to ensure a smooth authorization experience.
Source string
The source of the claim. If source is absent, the claim is a predefined optional claim. If source is user, the value of name is the extension property from the user object.
name string
The name of the optional claim.
additionalProperties string[]
List of Additional Properties of the claim. If a property exists in this list, it modifies the behaviour of the optional claim.
essential boolean
Whether the claim specified by the client is necessary to ensure a smooth authorization experience.
source string
The source of the claim. If source is absent, the claim is a predefined optional claim. If source is user, the value of name is the extension property from the user object.
name str
The name of the optional claim.
additional_properties Sequence[str]
List of Additional Properties of the claim. If a property exists in this list, it modifies the behaviour of the optional claim.
essential bool
Whether the claim specified by the client is necessary to ensure a smooth authorization experience.
source str
The source of the claim. If source is absent, the claim is a predefined optional claim. If source is user, the value of name is the extension property from the user object.

GetApplicationOptionalClaimsIdToken

Name string
The name of the optional claim.
AdditionalProperties List<string>
List of Additional Properties of the claim. If a property exists in this list, it modifies the behaviour of the optional claim.
Essential bool
Whether the claim specified by the client is necessary to ensure a smooth authorization experience.
Source string
The source of the claim. If source is absent, the claim is a predefined optional claim. If source is user, the value of name is the extension property from the user object.
Name string
The name of the optional claim.
AdditionalProperties []string
List of Additional Properties of the claim. If a property exists in this list, it modifies the behaviour of the optional claim.
Essential bool
Whether the claim specified by the client is necessary to ensure a smooth authorization experience.
Source string
The source of the claim. If source is absent, the claim is a predefined optional claim. If source is user, the value of name is the extension property from the user object.
name string
The name of the optional claim.
additionalProperties string[]
List of Additional Properties of the claim. If a property exists in this list, it modifies the behaviour of the optional claim.
essential boolean
Whether the claim specified by the client is necessary to ensure a smooth authorization experience.
source string
The source of the claim. If source is absent, the claim is a predefined optional claim. If source is user, the value of name is the extension property from the user object.
name str
The name of the optional claim.
additional_properties Sequence[str]
List of Additional Properties of the claim. If a property exists in this list, it modifies the behaviour of the optional claim.
essential bool
Whether the claim specified by the client is necessary to ensure a smooth authorization experience.
source str
The source of the claim. If source is absent, the claim is a predefined optional claim. If source is user, the value of name is the extension property from the user object.

GetApplicationRequiredResourceAccess

ResourceAccesses List<Pulumi.AzureAD.Inputs.GetApplicationRequiredResourceAccessResourceAccess>
A collection of resource_access blocks as documented below
ResourceAppId string
The unique identifier for the resource that the application requires access to.
ResourceAccesses []GetApplicationRequiredResourceAccessResourceAccess
A collection of resource_access blocks as documented below
ResourceAppId string
The unique identifier for the resource that the application requires access to.
resourceAccesses GetApplicationRequiredResourceAccessResourceAccess[]
A collection of resource_access blocks as documented below
resourceAppId string
The unique identifier for the resource that the application requires access to.
resource_accesses Sequence[GetApplicationRequiredResourceAccessResourceAccess]
A collection of resource_access blocks as documented below
resource_app_id str
The unique identifier for the resource that the application requires access to.

GetApplicationRequiredResourceAccessResourceAccess

Id string
The unique identifier for one of the OAuth2Permission or AppRole instances that the resource application exposes.
Type string
Specifies whether the id property references an OAuth2Permission or an AppRole.
Id string
The unique identifier for one of the OAuth2Permission or AppRole instances that the resource application exposes.
Type string
Specifies whether the id property references an OAuth2Permission or an AppRole.
id string
The unique identifier for one of the OAuth2Permission or AppRole instances that the resource application exposes.
type string
Specifies whether the id property references an OAuth2Permission or an AppRole.
id str
The unique identifier for one of the OAuth2Permission or AppRole instances that the resource application exposes.
type str
Specifies whether the id property references an OAuth2Permission or an AppRole.

Package Details

Repository
https://github.com/pulumi/pulumi-azuread
License
Apache-2.0
Notes
This Pulumi package is based on the azuread Terraform Provider.