1. Packages
  2. Azure Classic
  3. API Docs
  4. graph
  5. getServicesAccount

We recommend using Azure Native.

Azure v6.30.0 published on Thursday, Nov 20, 2025 by Pulumi
azure logo

We recommend using Azure Native.

Azure v6.30.0 published on Thursday, Nov 20, 2025 by Pulumi

    Use this data source to access information about an existing Graph Services Account.

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as azure from "@pulumi/azure";
    
    const example = azure.graph.getServicesAccount({
        name: "example-graph-services-account",
        resourceGroupName: "example-resources",
    });
    export const applicationId = example.then(example => example.applicationId);
    
    import pulumi
    import pulumi_azure as azure
    
    example = azure.graph.get_services_account(name="example-graph-services-account",
        resource_group_name="example-resources")
    pulumi.export("applicationId", example.application_id)
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-azure/sdk/v6/go/azure/graph"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		example, err := graph.LookupServicesAccount(ctx, &graph.LookupServicesAccountArgs{
    			Name:              "example-graph-services-account",
    			ResourceGroupName: "example-resources",
    		}, nil)
    		if err != nil {
    			return err
    		}
    		ctx.Export("applicationId", example.ApplicationId)
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Azure = Pulumi.Azure;
    
    return await Deployment.RunAsync(() => 
    {
        var example = Azure.Graph.GetServicesAccount.Invoke(new()
        {
            Name = "example-graph-services-account",
            ResourceGroupName = "example-resources",
        });
    
        return new Dictionary<string, object?>
        {
            ["applicationId"] = example.Apply(getServicesAccountResult => getServicesAccountResult.ApplicationId),
        };
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.azure.graph.GraphFunctions;
    import com.pulumi.azure.graph.inputs.GetServicesAccountArgs;
    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 = GraphFunctions.getServicesAccount(GetServicesAccountArgs.builder()
                .name("example-graph-services-account")
                .resourceGroupName("example-resources")
                .build());
    
            ctx.export("applicationId", example.applicationId());
        }
    }
    
    variables:
      example:
        fn::invoke:
          function: azure:graph:getServicesAccount
          arguments:
            name: example-graph-services-account
            resourceGroupName: example-resources
    outputs:
      applicationId: ${example.applicationId}
    

    API Providers

    This data source uses the following Azure API Providers:

    • Microsoft.GraphServices - 2023-04-13

    Using getServicesAccount

    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 getServicesAccount(args: GetServicesAccountArgs, opts?: InvokeOptions): Promise<GetServicesAccountResult>
    function getServicesAccountOutput(args: GetServicesAccountOutputArgs, opts?: InvokeOptions): Output<GetServicesAccountResult>
    def get_services_account(name: Optional[str] = None,
                             resource_group_name: Optional[str] = None,
                             opts: Optional[InvokeOptions] = None) -> GetServicesAccountResult
    def get_services_account_output(name: Optional[pulumi.Input[str]] = None,
                             resource_group_name: Optional[pulumi.Input[str]] = None,
                             opts: Optional[InvokeOptions] = None) -> Output[GetServicesAccountResult]
    func LookupServicesAccount(ctx *Context, args *LookupServicesAccountArgs, opts ...InvokeOption) (*LookupServicesAccountResult, error)
    func LookupServicesAccountOutput(ctx *Context, args *LookupServicesAccountOutputArgs, opts ...InvokeOption) LookupServicesAccountResultOutput

    > Note: This function is named LookupServicesAccount in the Go SDK.

    public static class GetServicesAccount 
    {
        public static Task<GetServicesAccountResult> InvokeAsync(GetServicesAccountArgs args, InvokeOptions? opts = null)
        public static Output<GetServicesAccountResult> Invoke(GetServicesAccountInvokeArgs args, InvokeOptions? opts = null)
    }
    public static CompletableFuture<GetServicesAccountResult> getServicesAccount(GetServicesAccountArgs args, InvokeOptions options)
    public static Output<GetServicesAccountResult> getServicesAccount(GetServicesAccountArgs args, InvokeOptions options)
    
    fn::invoke:
      function: azure:graph/getServicesAccount:getServicesAccount
      arguments:
        # arguments dictionary

    The following arguments are supported:

    Name string
    The name of the Graph Services Account.
    ResourceGroupName string
    The name of the Resource Group where the Graph Services Account exists.
    Name string
    The name of the Graph Services Account.
    ResourceGroupName string
    The name of the Resource Group where the Graph Services Account exists.
    name String
    The name of the Graph Services Account.
    resourceGroupName String
    The name of the Resource Group where the Graph Services Account exists.
    name string
    The name of the Graph Services Account.
    resourceGroupName string
    The name of the Resource Group where the Graph Services Account exists.
    name str
    The name of the Graph Services Account.
    resource_group_name str
    The name of the Resource Group where the Graph Services Account exists.
    name String
    The name of the Graph Services Account.
    resourceGroupName String
    The name of the Resource Group where the Graph Services Account exists.

    getServicesAccount Result

    The following output properties are available:

    ApplicationId string
    The application ID associated with the Graph Services Account.
    BillingPlanId string
    The billing plan ID for the Graph Services Account.
    Id string
    The provider-assigned unique ID for this managed resource.
    Name string
    ResourceGroupName string
    Tags Dictionary<string, string>
    A mapping of tags assigned to the Graph Services Account.
    ApplicationId string
    The application ID associated with the Graph Services Account.
    BillingPlanId string
    The billing plan ID for the Graph Services Account.
    Id string
    The provider-assigned unique ID for this managed resource.
    Name string
    ResourceGroupName string
    Tags map[string]string
    A mapping of tags assigned to the Graph Services Account.
    applicationId String
    The application ID associated with the Graph Services Account.
    billingPlanId String
    The billing plan ID for the Graph Services Account.
    id String
    The provider-assigned unique ID for this managed resource.
    name String
    resourceGroupName String
    tags Map<String,String>
    A mapping of tags assigned to the Graph Services Account.
    applicationId string
    The application ID associated with the Graph Services Account.
    billingPlanId string
    The billing plan ID for the Graph Services Account.
    id string
    The provider-assigned unique ID for this managed resource.
    name string
    resourceGroupName string
    tags {[key: string]: string}
    A mapping of tags assigned to the Graph Services Account.
    application_id str
    The application ID associated with the Graph Services Account.
    billing_plan_id str
    The billing plan ID for the Graph Services Account.
    id str
    The provider-assigned unique ID for this managed resource.
    name str
    resource_group_name str
    tags Mapping[str, str]
    A mapping of tags assigned to the Graph Services Account.
    applicationId String
    The application ID associated with the Graph Services Account.
    billingPlanId String
    The billing plan ID for the Graph Services Account.
    id String
    The provider-assigned unique ID for this managed resource.
    name String
    resourceGroupName String
    tags Map<String>
    A mapping of tags assigned to the Graph Services Account.

    Package Details

    Repository
    Azure Classic pulumi/pulumi-azure
    License
    Apache-2.0
    Notes
    This Pulumi package is based on the azurerm Terraform Provider.
    azure logo

    We recommend using Azure Native.

    Azure v6.30.0 published on Thursday, Nov 20, 2025 by Pulumi
      Meet Neo: Your AI Platform Teammate