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 dictionaryThe following arguments are supported:
- Name string
- The name of the Graph Services Account.
- Resource
Group stringName - The name of the Resource Group where the Graph Services Account exists.
- Name string
- The name of the Graph Services Account.
- Resource
Group stringName - The name of the Resource Group where the Graph Services Account exists.
- name String
- The name of the Graph Services Account.
- resource
Group StringName - The name of the Resource Group where the Graph Services Account exists.
- name string
- The name of the Graph Services Account.
- resource
Group stringName - The name of the Resource Group where the Graph Services Account exists.
- name str
- The name of the Graph Services Account.
- resource_
group_ strname - The name of the Resource Group where the Graph Services Account exists.
- name String
- The name of the Graph Services Account.
- resource
Group StringName - The name of the Resource Group where the Graph Services Account exists.
getServicesAccount Result
The following output properties are available:
- Application
Id string - The application ID associated with the Graph Services Account.
- Billing
Plan stringId - The billing plan ID for the Graph Services Account.
- Id string
- The provider-assigned unique ID for this managed resource.
- Name string
- Resource
Group stringName - Dictionary<string, string>
- A mapping of tags assigned to the Graph Services Account.
- Application
Id string - The application ID associated with the Graph Services Account.
- Billing
Plan stringId - The billing plan ID for the Graph Services Account.
- Id string
- The provider-assigned unique ID for this managed resource.
- Name string
- Resource
Group stringName - map[string]string
- A mapping of tags assigned to the Graph Services Account.
- application
Id String - The application ID associated with the Graph Services Account.
- billing
Plan StringId - The billing plan ID for the Graph Services Account.
- id String
- The provider-assigned unique ID for this managed resource.
- name String
- resource
Group StringName - Map<String,String>
- A mapping of tags assigned to the Graph Services Account.
- application
Id string - The application ID associated with the Graph Services Account.
- billing
Plan stringId - The billing plan ID for the Graph Services Account.
- id string
- The provider-assigned unique ID for this managed resource.
- name string
- resource
Group stringName - {[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_ strid - The billing plan ID for the Graph Services Account.
- id str
- The provider-assigned unique ID for this managed resource.
- name str
- resource_
group_ strname - Mapping[str, str]
- A mapping of tags assigned to the Graph Services Account.
- application
Id String - The application ID associated with the Graph Services Account.
- billing
Plan StringId - The billing plan ID for the Graph Services Account.
- id String
- The provider-assigned unique ID for this managed resource.
- name String
- resource
Group StringName - 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
azurermTerraform Provider.
