Show / Hide Table of Contents

Class ServicePrincipal

Manages a Service Principal associated with an 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 applications and Sign in and read user profile within the Windows Azure Active Directory API. Please see The Granting a Service Principal permission to manage AAD for the required steps.

Example Usage

using Pulumi;
using AzureAD = Pulumi.AzureAD;

class MyStack : Stack
{
public MyStack()
{
    var exampleApplication = new AzureAD.Application("exampleApplication", new AzureAD.ApplicationArgs
    {
        AvailableToOtherTenants = false,
        Homepage = "http://homepage",
        IdentifierUris = 
        {
            "http://uri",
        },
        Oauth2AllowImplicitFlow = true,
        ReplyUrls = 
        {
            "http://replyurl",
        },
    });
    var exampleServicePrincipal = new AzureAD.ServicePrincipal("exampleServicePrincipal", new AzureAD.ServicePrincipalArgs
    {
        AppRoleAssignmentRequired = false,
        ApplicationId = exampleApplication.ApplicationId,
        Tags = 
        {
            "example",
            "tags",
            "here",
        },
    });
}

}
Inheritance
System.Object
Resource
CustomResource
ServicePrincipal
Inherited Members
CustomResource.Id
Resource.GetResourceType()
Resource.GetResourceName()
Resource.Urn
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.ToString()
Namespace: Pulumi.AzureAD
Assembly: Pulumi.AzureAD.dll
Syntax
public class ServicePrincipal : CustomResource

Constructors

View Source

ServicePrincipal(String, ServicePrincipalArgs, CustomResourceOptions)

Create a ServicePrincipal resource with the given unique name, arguments, and options.

Declaration
public ServicePrincipal(string name, ServicePrincipalArgs args, CustomResourceOptions options = null)
Parameters
Type Name Description
System.String name

The unique name of the resource

ServicePrincipalArgs args

The arguments used to populate this resource's properties

CustomResourceOptions options

A bag of options that control this resource's behavior

Properties

View Source

ApplicationId

The ID of the Azure AD Application for which to create a Service Principal.

Declaration
public Output<string> ApplicationId { get; }
Property Value
Type Description
Output<System.String>
View Source

AppRoleAssignmentRequired

Does this Service Principal require an AppRoleAssignment to a user or group before Azure AD will issue a user or access token to the application? Defaults to false.

Declaration
public Output<bool?> AppRoleAssignmentRequired { get; }
Property Value
Type Description
Output<System.Nullable<System.Boolean>>
View Source

DisplayName

The Display Name of the Azure Active Directory Application associated with this Service Principal.

Declaration
public Output<string> DisplayName { get; }
Property Value
Type Description
Output<System.String>
View Source

Oauth2Permissions

A collection of OAuth 2.0 permissions exposed by the associated application. Each permission is covered by a oauth2_permission block as documented below.

Declaration
public Output<ImmutableArray<ServicePrincipalOauth2Permission>> Oauth2Permissions { get; }
Property Value
Type Description
Output<System.Collections.Immutable.ImmutableArray<ServicePrincipalOauth2Permission>>
View Source

ObjectId

The Service Principal's Object ID.

Declaration
public Output<string> ObjectId { get; }
Property Value
Type Description
Output<System.String>
View Source

Tags

A list of tags to apply to the Service Principal.

Declaration
public Output<ImmutableArray<string>> Tags { get; }
Property Value
Type Description
Output<System.Collections.Immutable.ImmutableArray<System.String>>

Methods

View Source

Get(String, Input<String>, ServicePrincipalState, CustomResourceOptions)

Get an existing ServicePrincipal resource's state with the given name, ID, and optional extra properties used to qualify the lookup.

Declaration
public static ServicePrincipal Get(string name, Input<string> id, ServicePrincipalState state = null, CustomResourceOptions options = null)
Parameters
Type Name Description
System.String name

The unique name of the resulting resource.

Input<System.String> id

The unique provider ID of the resource to lookup.

ServicePrincipalState state

Any extra arguments used during the lookup.

CustomResourceOptions options

A bag of options that control this resource's behavior

Returns
Type Description
ServicePrincipal
  • View Source
Back to top Copyright 2016-2020, Pulumi Corporation.