azuread.getServicePrincipal
Explore with Pulumi AI
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
import * as pulumi from "@pulumi/pulumi";
import * as azuread from "@pulumi/azuread";
const example = azuread.getServicePrincipal({
    displayName: "my-awesome-application",
});
import pulumi
import pulumi_azuread as azuread
example = azuread.get_service_principal(display_name="my-awesome-application")
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 {
		_, err := azuread.LookupServicePrincipal(ctx, &azuread.LookupServicePrincipalArgs{
			DisplayName: pulumi.StringRef("my-awesome-application"),
		}, nil)
		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 = AzureAD.GetServicePrincipal.Invoke(new()
    {
        DisplayName = "my-awesome-application",
    });
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.azuread.AzureadFunctions;
import com.pulumi.azuread.inputs.GetServicePrincipalArgs;
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) {
        final var example = AzureadFunctions.getServicePrincipal(GetServicePrincipalArgs.builder()
            .displayName("my-awesome-application")
            .build());
    }
}
variables:
  example:
    fn::invoke:
      function: azuread:getServicePrincipal
      arguments:
        displayName: my-awesome-application
Look up by client ID
import * as pulumi from "@pulumi/pulumi";
import * as azuread from "@pulumi/azuread";
const example = azuread.getServicePrincipal({
    clientId: "00000000-0000-0000-0000-000000000000",
});
import pulumi
import pulumi_azuread as azuread
example = azuread.get_service_principal(client_id="00000000-0000-0000-0000-000000000000")
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 {
		_, err := azuread.LookupServicePrincipal(ctx, &azuread.LookupServicePrincipalArgs{
			ClientId: pulumi.StringRef("00000000-0000-0000-0000-000000000000"),
		}, nil)
		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 = AzureAD.GetServicePrincipal.Invoke(new()
    {
        ClientId = "00000000-0000-0000-0000-000000000000",
    });
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.azuread.AzureadFunctions;
import com.pulumi.azuread.inputs.GetServicePrincipalArgs;
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) {
        final var example = AzureadFunctions.getServicePrincipal(GetServicePrincipalArgs.builder()
            .clientId("00000000-0000-0000-0000-000000000000")
            .build());
    }
}
variables:
  example:
    fn::invoke:
      function: azuread:getServicePrincipal
      arguments:
        clientId: 00000000-0000-0000-0000-000000000000
Look up by service principal object ID
import * as pulumi from "@pulumi/pulumi";
import * as azuread from "@pulumi/azuread";
const example = azuread.getServicePrincipal({
    objectId: "00000000-0000-0000-0000-000000000000",
});
import pulumi
import pulumi_azuread as azuread
example = azuread.get_service_principal(object_id="00000000-0000-0000-0000-000000000000")
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 {
		_, err := azuread.LookupServicePrincipal(ctx, &azuread.LookupServicePrincipalArgs{
			ObjectId: pulumi.StringRef("00000000-0000-0000-0000-000000000000"),
		}, nil)
		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 = AzureAD.GetServicePrincipal.Invoke(new()
    {
        ObjectId = "00000000-0000-0000-0000-000000000000",
    });
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.azuread.AzureadFunctions;
import com.pulumi.azuread.inputs.GetServicePrincipalArgs;
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) {
        final var example = AzureadFunctions.getServicePrincipal(GetServicePrincipalArgs.builder()
            .objectId("00000000-0000-0000-0000-000000000000")
            .build());
    }
}
variables:
  example:
    fn::invoke:
      function: azuread:getServicePrincipal
      arguments:
        objectId: 00000000-0000-0000-0000-000000000000
Using getServicePrincipal
Two invocation forms are available. The direct form accepts plain arguments and either blocks until the result value is available, or returns a Promise-wrapped result. The output form accepts Input-wrapped arguments and returns an Output-wrapped result.
function getServicePrincipal(args: GetServicePrincipalArgs, opts?: InvokeOptions): Promise<GetServicePrincipalResult>
function getServicePrincipalOutput(args: GetServicePrincipalOutputArgs, opts?: InvokeOptions): Output<GetServicePrincipalResult>def get_service_principal(client_id: Optional[str] = None,
                          display_name: Optional[str] = None,
                          object_id: Optional[str] = None,
                          opts: Optional[InvokeOptions] = None) -> GetServicePrincipalResult
def get_service_principal_output(client_id: Optional[pulumi.Input[str]] = None,
                          display_name: Optional[pulumi.Input[str]] = None,
                          object_id: Optional[pulumi.Input[str]] = None,
                          opts: Optional[InvokeOptions] = None) -> Output[GetServicePrincipalResult]func LookupServicePrincipal(ctx *Context, args *LookupServicePrincipalArgs, opts ...InvokeOption) (*LookupServicePrincipalResult, error)
func LookupServicePrincipalOutput(ctx *Context, args *LookupServicePrincipalOutputArgs, opts ...InvokeOption) LookupServicePrincipalResultOutput> Note: This function is named LookupServicePrincipal in the Go SDK.
public static class GetServicePrincipal 
{
    public static Task<GetServicePrincipalResult> InvokeAsync(GetServicePrincipalArgs args, InvokeOptions? opts = null)
    public static Output<GetServicePrincipalResult> Invoke(GetServicePrincipalInvokeArgs args, InvokeOptions? opts = null)
}public static CompletableFuture<GetServicePrincipalResult> getServicePrincipal(GetServicePrincipalArgs args, InvokeOptions options)
public static Output<GetServicePrincipalResult> getServicePrincipal(GetServicePrincipalArgs args, InvokeOptions options)
fn::invoke:
  function: azuread:index/getServicePrincipal:getServicePrincipal
  arguments:
    # arguments dictionaryThe following arguments are supported:
- ClientId string
- The client ID of the application associated with this service principal.
- DisplayName string
- The display name of the application associated with this service principal.
- ObjectId string
- The object ID of the service principal. - One of - client_id,- display_nameor- object_idmust be specified.
- ClientId string
- The client ID of the application associated with this service principal.
- DisplayName string
- The display name of the application associated with this service principal.
- ObjectId string
- The object ID of the service principal. - One of - client_id,- display_nameor- object_idmust be specified.
- clientId String
- The client ID of the application associated with this service principal.
- displayName String
- The display name of the application associated with this service principal.
- objectId String
- The object ID of the service principal. - One of - client_id,- display_nameor- object_idmust be specified.
- clientId string
- The client ID of the application associated with this service principal.
- displayName string
- The display name of the application associated with this service principal.
- objectId string
- The object ID of the service principal. - One of - client_id,- display_nameor- object_idmust be specified.
- client_id str
- The client ID of the application associated with this service principal.
- display_name str
- The display name of the application associated with this service principal.
- object_id str
- The object ID of the service principal. - One of - client_id,- display_nameor- object_idmust be specified.
- clientId String
- The client ID of the application associated with this service principal.
- displayName String
- The display name of the application associated with this service principal.
- objectId String
- The object ID of the service principal. - One of - client_id,- display_nameor- object_idmust be specified.
getServicePrincipal Result
The following output properties are available:
- AccountEnabled bool
- Whether the service principal account is enabled.
- AlternativeNames List<string>
- A list of alternative names, used to retrieve service principals by subscription, identify resource group and full resource ids for managed identities.
- AppRole boolAssignment Required 
- 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.
- AppRole Dictionary<string, string>Ids 
- 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.
- AppRoles List<Pulumi.Azure AD. Outputs. Get Service Principal App Role> 
- A list of app roles published by the associated application, as documented below. For more information official documentation.
- ApplicationTenant stringId 
- The tenant ID where the associated application is registered.
- ClientId string
- The client ID of the application associated with this service principal.
- Description string
- Permission help text that appears in the admin app assignment and consent experiences.
- DisplayName string
- Display name for the permission that appears in the admin consent and app assignment experiences.
- 
List<Pulumi.Azure AD. Outputs. Get Service Principal Feature Tag> 
- Features
List<Pulumi.Azure AD. Outputs. Get Service Principal Feature> 
- A featuresblock as described below.
- HomepageUrl string
- Home page or landing page of the associated application.
- Id string
- The provider-assigned unique ID for this managed resource.
- LoginUrl 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.
- LogoutUrl 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.
- Notes string
- A free text field to capture information about the service principal, typically used for operational purposes.
- NotificationEmail List<string>Addresses 
- 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.
- Oauth2PermissionScope Dictionary<string, string>Ids 
- 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.
- Oauth2PermissionScopes List<Pulumi.Azure AD. Outputs. Get Service Principal Oauth2Permission Scope> 
- A collection of OAuth 2.0 delegated permissions exposed by the associated application. Each permission is covered by an oauth2_permission_scopesblock as documented below.
- ObjectId string
- The object ID of the service principal.
- PreferredSingle stringSign On Mode 
- 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.
- RedirectUris List<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.
- SamlMetadata stringUrl 
- The URL where the service exposes SAML metadata for federation.
- SamlSingle List<Pulumi.Sign Ons Azure AD. Outputs. Get Service Principal Saml Single Sign On> 
- A saml_single_sign_onblock as documented below.
- ServicePrincipal List<string>Names 
- A list of identifier URI(s), copied over from the associated application.
- SignIn stringAudience 
- The Microsoft account types that are supported for the associated application. Possible values include AzureADMyOrg,AzureADMultipleOrgs,AzureADandPersonalMicrosoftAccountorPersonalMicrosoftAccount.
- List<string>
- A list of tags applied to the service principal.
- Type 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 UserorAdmin.
- AccountEnabled bool
- Whether the service principal account is enabled.
- AlternativeNames []string
- A list of alternative names, used to retrieve service principals by subscription, identify resource group and full resource ids for managed identities.
- AppRole boolAssignment Required 
- 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.
- AppRole map[string]stringIds 
- 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.
- AppRoles []GetService Principal App Role 
- A list of app roles published by the associated application, as documented below. For more information official documentation.
- ApplicationTenant stringId 
- The tenant ID where the associated application is registered.
- ClientId string
- The client ID of the application associated with this service principal.
- Description string
- Permission help text that appears in the admin app assignment and consent experiences.
- DisplayName string
- Display name for the permission that appears in the admin consent and app assignment experiences.
- 
[]GetService Principal Feature Tag 
- Features
[]GetService Principal Feature 
- A featuresblock as described below.
- HomepageUrl string
- Home page or landing page of the associated application.
- Id string
- The provider-assigned unique ID for this managed resource.
- LoginUrl 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.
- LogoutUrl 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.
- Notes string
- A free text field to capture information about the service principal, typically used for operational purposes.
- NotificationEmail []stringAddresses 
- 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.
- Oauth2PermissionScope map[string]stringIds 
- 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.
- Oauth2PermissionScopes []GetService Principal Oauth2Permission Scope 
- A collection of OAuth 2.0 delegated permissions exposed by the associated application. Each permission is covered by an oauth2_permission_scopesblock as documented below.
- ObjectId string
- The object ID of the service principal.
- PreferredSingle stringSign On Mode 
- 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.
- RedirectUris []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.
- SamlMetadata stringUrl 
- The URL where the service exposes SAML metadata for federation.
- SamlSingle []GetSign Ons Service Principal Saml Single Sign On 
- A saml_single_sign_onblock as documented below.
- ServicePrincipal []stringNames 
- A list of identifier URI(s), copied over from the associated application.
- SignIn stringAudience 
- The Microsoft account types that are supported for the associated application. Possible values include AzureADMyOrg,AzureADMultipleOrgs,AzureADandPersonalMicrosoftAccountorPersonalMicrosoftAccount.
- []string
- A list of tags applied to the service principal.
- Type 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 UserorAdmin.
- accountEnabled Boolean
- Whether the service principal account is enabled.
- alternativeNames List<String>
- A list of alternative names, used to retrieve service principals by subscription, identify resource group and full resource ids for managed identities.
- appRole BooleanAssignment Required 
- 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.
- appRole Map<String,String>Ids 
- 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.
- appRoles List<GetService Principal App Role> 
- A list of app roles published by the associated application, as documented below. For more information official documentation.
- applicationTenant StringId 
- The tenant ID where the associated application is registered.
- clientId String
- The client ID of the application associated with this service principal.
- description String
- Permission help text that appears in the admin app assignment and consent experiences.
- displayName String
- Display name for the permission that appears in the admin consent and app assignment experiences.
- 
List<GetService Principal Feature Tag> 
- features
List<GetService Principal Feature> 
- A featuresblock as described below.
- homepageUrl String
- Home page or landing page of the associated application.
- id String
- The provider-assigned unique ID for this managed resource.
- loginUrl 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.
- logoutUrl 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.
- notes String
- A free text field to capture information about the service principal, typically used for operational purposes.
- notificationEmail List<String>Addresses 
- 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.
- oauth2PermissionScope Map<String,String>Ids 
- 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.
- oauth2PermissionScopes List<GetService Principal Oauth2Permission Scope> 
- A collection of OAuth 2.0 delegated permissions exposed by the associated application. Each permission is covered by an oauth2_permission_scopesblock as documented below.
- objectId String
- The object ID of the service principal.
- preferredSingle StringSign On Mode 
- 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.
- redirectUris List<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.
- samlMetadata StringUrl 
- The URL where the service exposes SAML metadata for federation.
- samlSingle List<GetSign Ons Service Principal Saml Single Sign On> 
- A saml_single_sign_onblock as documented below.
- servicePrincipal List<String>Names 
- A list of identifier URI(s), copied over from the associated application.
- signIn StringAudience 
- The Microsoft account types that are supported for the associated application. Possible values include AzureADMyOrg,AzureADMultipleOrgs,AzureADandPersonalMicrosoftAccountorPersonalMicrosoftAccount.
- List<String>
- A list of tags applied to the service principal.
- type 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 UserorAdmin.
- accountEnabled boolean
- Whether the service principal account is enabled.
- alternativeNames string[]
- A list of alternative names, used to retrieve service principals by subscription, identify resource group and full resource ids for managed identities.
- appRole booleanAssignment Required 
- 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.
- appRole {[key: string]: string}Ids 
- 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.
- appRoles GetService Principal App Role[] 
- A list of app roles published by the associated application, as documented below. For more information official documentation.
- applicationTenant stringId 
- The tenant ID where the associated application is registered.
- clientId string
- The client ID of the application associated with this service principal.
- description string
- Permission help text that appears in the admin app assignment and consent experiences.
- displayName string
- Display name for the permission that appears in the admin consent and app assignment experiences.
- 
GetService Principal Feature Tag[] 
- features
GetService Principal Feature[] 
- A featuresblock as described below.
- homepageUrl string
- Home page or landing page of the associated application.
- id string
- The provider-assigned unique ID for this managed resource.
- loginUrl 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.
- logoutUrl 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.
- notes string
- A free text field to capture information about the service principal, typically used for operational purposes.
- notificationEmail string[]Addresses 
- 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.
- oauth2PermissionScope {[key: string]: string}Ids 
- 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.
- oauth2PermissionScopes GetService Principal Oauth2Permission Scope[] 
- A collection of OAuth 2.0 delegated permissions exposed by the associated application. Each permission is covered by an oauth2_permission_scopesblock as documented below.
- objectId string
- The object ID of the service principal.
- preferredSingle stringSign On Mode 
- 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.
- redirectUris 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.
- samlMetadata stringUrl 
- The URL where the service exposes SAML metadata for federation.
- samlSingle GetSign Ons Service Principal Saml Single Sign On[] 
- A saml_single_sign_onblock as documented below.
- servicePrincipal string[]Names 
- A list of identifier URI(s), copied over from the associated application.
- signIn stringAudience 
- The Microsoft account types that are supported for the associated application. Possible values include AzureADMyOrg,AzureADMultipleOrgs,AzureADandPersonalMicrosoftAccountorPersonalMicrosoftAccount.
- string[]
- A list of tags applied to the service principal.
- type 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 UserorAdmin.
- account_enabled bool
- Whether the service principal account is enabled.
- alternative_names Sequence[str]
- A list of alternative names, used to retrieve service principals by subscription, identify resource group and full resource ids for managed identities.
- app_role_ boolassignment_ required 
- 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.
- app_role_ Mapping[str, str]ids 
- 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.
- app_roles Sequence[GetService Principal App Role] 
- A list of app roles published by the associated application, as documented below. For more information official documentation.
- application_tenant_ strid 
- The tenant ID where the associated application is registered.
- client_id str
- The client ID of the application associated with this service principal.
- description str
- Permission help text that appears in the admin app assignment and consent experiences.
- display_name str
- Display name for the permission that appears in the admin consent and app assignment experiences.
- 
Sequence[GetService Principal Feature Tag] 
- features
Sequence[GetService Principal Feature] 
- A featuresblock as described below.
- homepage_url str
- Home page or landing page of the associated application.
- id str
- The provider-assigned unique ID for this managed resource.
- login_url str
- 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.
- logout_url str
- 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.
- notes str
- A free text field to capture information about the service principal, typically used for operational purposes.
- notification_email_ Sequence[str]addresses 
- 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.
- oauth2_permission_ Mapping[str, str]scope_ ids 
- 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.
- oauth2_permission_ Sequence[Getscopes Service Principal Oauth2Permission Scope] 
- A collection of OAuth 2.0 delegated permissions exposed by the associated application. Each permission is covered by an oauth2_permission_scopesblock as documented below.
- object_id str
- The object ID of the service principal.
- preferred_single_ strsign_ on_ mode 
- 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.
- redirect_uris Sequence[str]
- 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.
- saml_metadata_ strurl 
- The URL where the service exposes SAML metadata for federation.
- saml_single_ Sequence[Getsign_ ons Service Principal Saml Single Sign On] 
- A saml_single_sign_onblock as documented below.
- service_principal_ Sequence[str]names 
- A list of identifier URI(s), copied over from the associated application.
- sign_in_ straudience 
- The Microsoft account types that are supported for the associated application. Possible values include AzureADMyOrg,AzureADMultipleOrgs,AzureADandPersonalMicrosoftAccountorPersonalMicrosoftAccount.
- Sequence[str]
- A list of tags applied to the service principal.
- type str
- 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 UserorAdmin.
- accountEnabled Boolean
- Whether the service principal account is enabled.
- alternativeNames List<String>
- A list of alternative names, used to retrieve service principals by subscription, identify resource group and full resource ids for managed identities.
- appRole BooleanAssignment Required 
- 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.
- appRole Map<String>Ids 
- 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.
- appRoles List<Property Map>
- A list of app roles published by the associated application, as documented below. For more information official documentation.
- applicationTenant StringId 
- The tenant ID where the associated application is registered.
- clientId String
- The client ID of the application associated with this service principal.
- description String
- Permission help text that appears in the admin app assignment and consent experiences.
- displayName String
- Display name for the permission that appears in the admin consent and app assignment experiences.
- List<Property Map>
- features List<Property Map>
- A featuresblock as described below.
- homepageUrl String
- Home page or landing page of the associated application.
- id String
- The provider-assigned unique ID for this managed resource.
- loginUrl 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.
- logoutUrl 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.
- notes String
- A free text field to capture information about the service principal, typically used for operational purposes.
- notificationEmail List<String>Addresses 
- 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.
- oauth2PermissionScope Map<String>Ids 
- 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.
- oauth2PermissionScopes List<Property Map>
- A collection of OAuth 2.0 delegated permissions exposed by the associated application. Each permission is covered by an oauth2_permission_scopesblock as documented below.
- objectId String
- The object ID of the service principal.
- preferredSingle StringSign On Mode 
- 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.
- redirectUris List<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.
- samlMetadata StringUrl 
- The URL where the service exposes SAML metadata for federation.
- samlSingle List<Property Map>Sign Ons 
- A saml_single_sign_onblock as documented below.
- servicePrincipal List<String>Names 
- A list of identifier URI(s), copied over from the associated application.
- signIn StringAudience 
- The Microsoft account types that are supported for the associated application. Possible values include AzureADMyOrg,AzureADMultipleOrgs,AzureADandPersonalMicrosoftAccountorPersonalMicrosoftAccount.
- List<String>
- A list of tags applied to the service principal.
- type 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 UserorAdmin.
Supporting Types
GetServicePrincipalAppRole    
- AllowedMember List<string>Types 
- 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: UserandApplication, or both.
- Description string
- Permission help text that appears in the admin app assignment and consent experiences.
- DisplayName string
- The display name of the application associated with this service principal.
- Enabled bool
- Determines if the permission scope is enabled.
- Id string
- The unique identifier of the delegated permission. Must be a valid UUID.
- Value string
- The value that is used for the scpclaim in OAuth 2.0 access tokens.
- AllowedMember []stringTypes 
- 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: UserandApplication, or both.
- Description string
- Permission help text that appears in the admin app assignment and consent experiences.
- DisplayName string
- The display name of the application associated with this service principal.
- Enabled bool
- Determines if the permission scope is enabled.
- Id string
- The unique identifier of the delegated permission. Must be a valid UUID.
- Value string
- The value that is used for the scpclaim in OAuth 2.0 access tokens.
- allowedMember List<String>Types 
- 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: UserandApplication, or both.
- description String
- Permission help text that appears in the admin app assignment and consent experiences.
- displayName String
- The display name of the application associated with this service principal.
- enabled Boolean
- Determines if the permission scope is enabled.
- id String
- The unique identifier of the delegated permission. Must be a valid UUID.
- value String
- The value that is used for the scpclaim in OAuth 2.0 access tokens.
- allowedMember string[]Types 
- 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: UserandApplication, or both.
- description string
- Permission help text that appears in the admin app assignment and consent experiences.
- displayName string
- The display name of the application associated with this service principal.
- enabled boolean
- Determines if the permission scope is enabled.
- id string
- The unique identifier of the delegated permission. Must be a valid UUID.
- value string
- The value that is used for the scpclaim in OAuth 2.0 access tokens.
- allowed_member_ Sequence[str]types 
- 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: UserandApplication, or both.
- description str
- Permission help text that appears in the admin app assignment and consent experiences.
- display_name str
- The display name of the application associated with this service principal.
- enabled bool
- Determines if the permission scope is enabled.
- id str
- The unique identifier of the delegated permission. Must be a valid UUID.
- value str
- The value that is used for the scpclaim in OAuth 2.0 access tokens.
- allowedMember List<String>Types 
- 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: UserandApplication, or both.
- description String
- Permission help text that appears in the admin app assignment and consent experiences.
- displayName String
- The display name of the application associated with this service principal.
- enabled Boolean
- Determines if the permission scope is enabled.
- id String
- The unique identifier of the delegated permission. Must be a valid UUID.
- value String
- The value that is used for the scpclaim in OAuth 2.0 access tokens.
GetServicePrincipalFeature   
- CustomSingle boolSign On App 
- Whether this service principal represents a custom SAML application.
- EnterpriseApplication bool
- Whether this service principal represents an Enterprise Application.
- GalleryApplication bool
- Whether this service principal represents a gallery application.
- VisibleTo boolUsers 
- Whether this app is visible to users in My Apps and Office 365 Launcher.
- CustomSingle boolSign On App 
- Whether this service principal represents a custom SAML application.
- EnterpriseApplication bool
- Whether this service principal represents an Enterprise Application.
- GalleryApplication bool
- Whether this service principal represents a gallery application.
- VisibleTo boolUsers 
- Whether this app is visible to users in My Apps and Office 365 Launcher.
- customSingle BooleanSign On App 
- Whether this service principal represents a custom SAML application.
- enterpriseApplication Boolean
- Whether this service principal represents an Enterprise Application.
- galleryApplication Boolean
- Whether this service principal represents a gallery application.
- visibleTo BooleanUsers 
- Whether this app is visible to users in My Apps and Office 365 Launcher.
- customSingle booleanSign On App 
- Whether this service principal represents a custom SAML application.
- enterpriseApplication boolean
- Whether this service principal represents an Enterprise Application.
- galleryApplication boolean
- Whether this service principal represents a gallery application.
- visibleTo booleanUsers 
- Whether this app is visible to users in My Apps and Office 365 Launcher.
- custom_single_ boolsign_ on_ app 
- Whether this service principal represents a custom SAML application.
- enterprise_application bool
- Whether this service principal represents an Enterprise Application.
- gallery_application bool
- Whether this service principal represents a gallery application.
- visible_to_ boolusers 
- Whether this app is visible to users in My Apps and Office 365 Launcher.
- customSingle BooleanSign On App 
- Whether this service principal represents a custom SAML application.
- enterpriseApplication Boolean
- Whether this service principal represents an Enterprise Application.
- galleryApplication Boolean
- Whether this service principal represents a gallery application.
- visibleTo BooleanUsers 
- Whether this app is visible to users in My Apps and Office 365 Launcher.
GetServicePrincipalFeatureTag    
- CustomSingle boolSign On 
- Whether this service principal represents a custom SAML application
- Enterprise bool
- Whether this service principal represents an Enterprise Application
- Gallery bool
- Whether this service principal represents a gallery application
- Hide bool
- Whether this app is invisible to users in My Apps and Office 365 Launcher
- CustomSingle boolSign On 
- Whether this service principal represents a custom SAML application
- Enterprise bool
- Whether this service principal represents an Enterprise Application
- Gallery bool
- Whether this service principal represents a gallery application
- Hide bool
- Whether this app is invisible to users in My Apps and Office 365 Launcher
- customSingle BooleanSign On 
- Whether this service principal represents a custom SAML application
- enterprise Boolean
- Whether this service principal represents an Enterprise Application
- gallery Boolean
- Whether this service principal represents a gallery application
- hide Boolean
- Whether this app is invisible to users in My Apps and Office 365 Launcher
- customSingle booleanSign On 
- Whether this service principal represents a custom SAML application
- enterprise boolean
- Whether this service principal represents an Enterprise Application
- gallery boolean
- Whether this service principal represents a gallery application
- hide boolean
- Whether this app is invisible to users in My Apps and Office 365 Launcher
- custom_single_ boolsign_ on 
- Whether this service principal represents a custom SAML application
- enterprise bool
- Whether this service principal represents an Enterprise Application
- gallery bool
- Whether this service principal represents a gallery application
- hide bool
- Whether this app is invisible to users in My Apps and Office 365 Launcher
- customSingle BooleanSign On 
- Whether this service principal represents a custom SAML application
- enterprise Boolean
- Whether this service principal represents an Enterprise Application
- gallery Boolean
- Whether this service principal represents a gallery application
- hide Boolean
- Whether this app is invisible to users in My Apps and Office 365 Launcher
GetServicePrincipalOauth2PermissionScope    
- AdminConsent stringDescription 
- Delegated permission description that appears in all tenant-wide admin consent experiences, intended to be read by an administrator granting the permission on behalf of all users.
- AdminConsent stringDisplay Name 
- Display name for the delegated permission, intended to be read by an administrator granting the permission on behalf of all users.
- Enabled bool
- Determines if the permission scope is enabled.
- Id string
- The unique identifier of the delegated permission. Must be a valid UUID.
- Type 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 UserorAdmin.
- UserConsent stringDescription 
- Delegated permission description that appears in the end user consent experience, intended to be read by a user consenting on their own behalf.
- UserConsent stringDisplay Name 
- Display name for the delegated permission that appears in the end user consent experience.
- Value string
- The value that is used for the scpclaim in OAuth 2.0 access tokens.
- AdminConsent stringDescription 
- Delegated permission description that appears in all tenant-wide admin consent experiences, intended to be read by an administrator granting the permission on behalf of all users.
- AdminConsent stringDisplay Name 
- Display name for the delegated permission, intended to be read by an administrator granting the permission on behalf of all users.
- Enabled bool
- Determines if the permission scope is enabled.
- Id string
- The unique identifier of the delegated permission. Must be a valid UUID.
- Type 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 UserorAdmin.
- UserConsent stringDescription 
- Delegated permission description that appears in the end user consent experience, intended to be read by a user consenting on their own behalf.
- UserConsent stringDisplay Name 
- Display name for the delegated permission that appears in the end user consent experience.
- Value string
- The value that is used for the scpclaim in OAuth 2.0 access tokens.
- adminConsent StringDescription 
- Delegated permission description that appears in all tenant-wide admin consent experiences, intended to be read by an administrator granting the permission on behalf of all users.
- adminConsent StringDisplay Name 
- Display name for the delegated permission, intended to be read by an administrator granting the permission on behalf of all users.
- enabled Boolean
- Determines if the permission scope is enabled.
- id String
- The unique identifier of the delegated permission. Must be a valid UUID.
- type 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 UserorAdmin.
- userConsent StringDescription 
- Delegated permission description that appears in the end user consent experience, intended to be read by a user consenting on their own behalf.
- userConsent StringDisplay Name 
- Display name for the delegated permission that appears in the end user consent experience.
- value String
- The value that is used for the scpclaim in OAuth 2.0 access tokens.
- adminConsent stringDescription 
- Delegated permission description that appears in all tenant-wide admin consent experiences, intended to be read by an administrator granting the permission on behalf of all users.
- adminConsent stringDisplay Name 
- Display name for the delegated permission, intended to be read by an administrator granting the permission on behalf of all users.
- enabled boolean
- Determines if the permission scope is enabled.
- id string
- The unique identifier of the delegated permission. Must be a valid UUID.
- type 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 UserorAdmin.
- userConsent stringDescription 
- Delegated permission description that appears in the end user consent experience, intended to be read by a user consenting on their own behalf.
- userConsent stringDisplay Name 
- Display name for the delegated permission that appears in the end user consent experience.
- value string
- The value that is used for the scpclaim in OAuth 2.0 access tokens.
- admin_consent_ strdescription 
- Delegated permission description that appears in all tenant-wide admin consent experiences, intended to be read by an administrator granting the permission on behalf of all users.
- admin_consent_ strdisplay_ name 
- Display name for the delegated permission, intended to be read by an administrator granting the permission on behalf of all users.
- enabled bool
- Determines if the permission scope is enabled.
- id str
- The unique identifier of the delegated permission. Must be a valid UUID.
- type str
- 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 UserorAdmin.
- user_consent_ strdescription 
- Delegated permission description that appears in the end user consent experience, intended to be read by a user consenting on their own behalf.
- user_consent_ strdisplay_ name 
- Display name for the delegated permission that appears in the end user consent experience.
- value str
- The value that is used for the scpclaim in OAuth 2.0 access tokens.
- adminConsent StringDescription 
- Delegated permission description that appears in all tenant-wide admin consent experiences, intended to be read by an administrator granting the permission on behalf of all users.
- adminConsent StringDisplay Name 
- Display name for the delegated permission, intended to be read by an administrator granting the permission on behalf of all users.
- enabled Boolean
- Determines if the permission scope is enabled.
- id String
- The unique identifier of the delegated permission. Must be a valid UUID.
- type 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 UserorAdmin.
- userConsent StringDescription 
- Delegated permission description that appears in the end user consent experience, intended to be read by a user consenting on their own behalf.
- userConsent StringDisplay Name 
- Display name for the delegated permission that appears in the end user consent experience.
- value String
- The value that is used for the scpclaim in OAuth 2.0 access tokens.
GetServicePrincipalSamlSingleSignOn      
- RelayState string
- The relative URI the service provider would redirect to after completion of the single sign-on flow.
- RelayState string
- The relative URI the service provider would redirect to after completion of the single sign-on flow.
- relayState String
- The relative URI the service provider would redirect to after completion of the single sign-on flow.
- relayState string
- The relative URI the service provider would redirect to after completion of the single sign-on flow.
- relay_state str
- The relative URI the service provider would redirect to after completion of the single sign-on flow.
- relayState String
- The relative URI the service provider would redirect to after completion of the single sign-on flow.
Package Details
- Repository
- Azure Active Directory (Azure AD) pulumi/pulumi-azuread
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the azureadTerraform Provider.