UNPKG

@pulumi/azuread

Version:

A Pulumi package for creating and managing Azure Active Directory (Azure AD) cloud resources.

255 lines (254 loc) • 9.7 kB
import * as pulumi from "@pulumi/pulumi"; import * as outputs from "./types/output"; /** * Gets information about an existing service principal associated with an application within Azure Active Directory. * * ## API Permissions * * The following API permissions are required in order to use this data source. * * When authenticated with a service principal, this data source requires one of the following application roles: `Application.Read.All` or `Directory.Read.All` * * When authenticated with a user principal, this data source does not require any additional roles. * * ## Example Usage * * *Look up by application display name* * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as azuread from "@pulumi/azuread"; * * const example = azuread.getServicePrincipal({ * displayName: "my-awesome-application", * }); * ``` * * *Look up by client ID* * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as azuread from "@pulumi/azuread"; * * const example = azuread.getServicePrincipal({ * clientId: "00000000-0000-0000-0000-000000000000", * }); * ``` * * *Look up by service principal object ID* * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as azuread from "@pulumi/azuread"; * * const example = azuread.getServicePrincipal({ * objectId: "00000000-0000-0000-0000-000000000000", * }); * ``` */ export declare function getServicePrincipal(args?: GetServicePrincipalArgs, opts?: pulumi.InvokeOptions): Promise<GetServicePrincipalResult>; /** * A collection of arguments for invoking getServicePrincipal. */ export interface GetServicePrincipalArgs { /** * The client ID of the application associated with this service principal. */ clientId?: string; /** * The display name of the application associated with this service principal. */ displayName?: string; /** * The object ID of the service principal. * * > One of `clientId`, `displayName` or `objectId` must be specified. */ objectId?: string; } /** * A collection of values returned by getServicePrincipal. */ export interface GetServicePrincipalResult { /** * Whether the service principal account is enabled. */ readonly accountEnabled: boolean; /** * A list of alternative names, used to retrieve service principals by subscription, identify resource group and full resource ids for managed identities. */ readonly alternativeNames: string[]; /** * Whether this service principal requires an app role assignment to a user or group before Azure AD will issue a user or access token to the application. */ readonly appRoleAssignmentRequired: boolean; /** * A mapping of app role values to app role IDs, as published by the associated application, intended to be useful when referencing app roles in other resources in your configuration. */ readonly appRoleIds: { [key: string]: string; }; /** * A list of app roles published by the associated application, as documented below. For more information [official documentation](https://docs.microsoft.com/en-us/azure/architecture/multitenant-identity/app-roles). */ readonly appRoles: outputs.GetServicePrincipalAppRole[]; /** * The tenant ID where the associated application is registered. */ readonly applicationTenantId: string; /** * The client ID of the application associated with this service principal. */ readonly clientId: string; /** * Permission help text that appears in the admin app assignment and consent experiences. */ readonly description: string; /** * Display name for the permission that appears in the admin consent and app assignment experiences. */ readonly displayName: string; readonly featureTags: outputs.GetServicePrincipalFeatureTag[]; /** * A `features` block as described below. * * @deprecated This block has been renamed to `featureTags` and will be removed in version 3.0 of the provider */ readonly features: outputs.GetServicePrincipalFeature[]; /** * Home page or landing page of the associated application. */ readonly homepageUrl: string; /** * The provider-assigned unique ID for this managed resource. */ readonly id: string; /** * The URL where the service provider redirects the user to Azure AD to authenticate. Azure AD uses the URL to launch the application from Microsoft 365 or the Azure AD My Apps. */ readonly loginUrl: string; /** * The URL that will be used by Microsoft's authorization service to logout an user using OpenId Connect front-channel, back-channel or SAML logout protocols, taken from the associated application. */ readonly logoutUrl: string; /** * A free text field to capture information about the service principal, typically used for operational purposes. */ readonly notes: string; /** * A list of email addresses where Azure AD sends a notification when the active certificate is near the expiration date. This is only for the certificates used to sign the SAML token issued for Azure AD Gallery applications. */ readonly notificationEmailAddresses: string[]; /** * A mapping of OAuth2.0 permission scope values to scope IDs, as exposed by the associated application, intended to be useful when referencing permission scopes in other resources in your configuration. */ readonly oauth2PermissionScopeIds: { [key: string]: string; }; /** * A collection of OAuth 2.0 delegated permissions exposed by the associated application. Each permission is covered by an `oauth2PermissionScopes` block as documented below. */ readonly oauth2PermissionScopes: outputs.GetServicePrincipalOauth2PermissionScope[]; /** * The object ID of the service principal. */ readonly objectId: string; /** * The single sign-on mode configured for this application. Azure AD uses the preferred single sign-on mode to launch the application from Microsoft 365 or the Azure AD My Apps. */ readonly preferredSingleSignOnMode: string; /** * A list of URLs where user tokens are sent for sign-in with the associated application, or the redirect URIs where OAuth 2.0 authorization codes and access tokens are sent for the associated application. */ readonly redirectUris: string[]; /** * The URL where the service exposes SAML metadata for federation. */ readonly samlMetadataUrl: string; /** * A `samlSingleSignOn` block as documented below. */ readonly samlSingleSignOns: outputs.GetServicePrincipalSamlSingleSignOn[]; /** * A list of identifier URI(s), copied over from the associated application. */ readonly servicePrincipalNames: string[]; /** * The Microsoft account types that are supported for the associated application. Possible values include `AzureADMyOrg`, `AzureADMultipleOrgs`, `AzureADandPersonalMicrosoftAccount` or `PersonalMicrosoftAccount`. */ readonly signInAudience: string; /** * A list of tags applied to the service principal. */ readonly tags: string[]; /** * Whether this delegated permission should be considered safe for non-admin users to consent to on behalf of themselves, or whether an administrator should be required for consent to the permissions. Possible values are `User` or `Admin`. */ readonly type: string; } /** * Gets information about an existing service principal associated with an application within Azure Active Directory. * * ## API Permissions * * The following API permissions are required in order to use this data source. * * When authenticated with a service principal, this data source requires one of the following application roles: `Application.Read.All` or `Directory.Read.All` * * When authenticated with a user principal, this data source does not require any additional roles. * * ## Example Usage * * *Look up by application display name* * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as azuread from "@pulumi/azuread"; * * const example = azuread.getServicePrincipal({ * displayName: "my-awesome-application", * }); * ``` * * *Look up by client ID* * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as azuread from "@pulumi/azuread"; * * const example = azuread.getServicePrincipal({ * clientId: "00000000-0000-0000-0000-000000000000", * }); * ``` * * *Look up by service principal object ID* * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as azuread from "@pulumi/azuread"; * * const example = azuread.getServicePrincipal({ * objectId: "00000000-0000-0000-0000-000000000000", * }); * ``` */ export declare function getServicePrincipalOutput(args?: GetServicePrincipalOutputArgs, opts?: pulumi.InvokeOutputOptions): pulumi.Output<GetServicePrincipalResult>; /** * A collection of arguments for invoking getServicePrincipal. */ export interface GetServicePrincipalOutputArgs { /** * The client ID of the application associated with this service principal. */ clientId?: pulumi.Input<string>; /** * The display name of the application associated with this service principal. */ displayName?: pulumi.Input<string>; /** * The object ID of the service principal. * * > One of `clientId`, `displayName` or `objectId` must be specified. */ objectId?: pulumi.Input<string>; }