1. Packages
  2. Azure Active Directory (Azure AD)
  3. API Docs
  4. getClientConfig
Azure Active Directory (Azure AD) v6.4.0 published on Monday, Apr 7, 2025 by Pulumi

azuread.getClientConfig

Explore with Pulumi AI

Azure Active Directory (Azure AD) v6.4.0 published on Monday, Apr 7, 2025 by Pulumi

Use this data source to access the configuration of the AzureAD provider.

API Permissions

No additional roles are required to use this data source.

Example Usage

import * as pulumi from "@pulumi/pulumi";
import * as azuread from "@pulumi/azuread";

const current = azuread.getClientConfig({});
export const objectId = current.then(current => current.objectId);
Copy
import pulumi
import pulumi_azuread as azuread

current = azuread.get_client_config()
pulumi.export("objectId", current.object_id)
Copy
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 {
		current, err := azuread.GetClientConfig(ctx, map[string]interface{}{}, nil)
		if err != nil {
			return err
		}
		ctx.Export("objectId", current.ObjectId)
		return nil
	})
}
Copy
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using AzureAD = Pulumi.AzureAD;

return await Deployment.RunAsync(() => 
{
    var current = AzureAD.GetClientConfig.Invoke();

    return new Dictionary<string, object?>
    {
        ["objectId"] = current.Apply(getClientConfigResult => getClientConfigResult.ObjectId),
    };
});
Copy
package generated_program;

import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.azuread.AzureadFunctions;
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 current = AzureadFunctions.getClientConfig();

        ctx.export("objectId", current.applyValue(getClientConfigResult -> getClientConfigResult.objectId()));
    }
}
Copy
variables:
  current:
    fn::invoke:
      function: azuread:getClientConfig
      arguments: {}
outputs:
  objectId: ${current.objectId}
Copy

Using getClientConfig

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 getClientConfig(opts?: InvokeOptions): Promise<GetClientConfigResult>
function getClientConfigOutput(opts?: InvokeOptions): Output<GetClientConfigResult>
Copy
def get_client_config(opts: Optional[InvokeOptions] = None) -> GetClientConfigResult
def get_client_config_output(opts: Optional[InvokeOptions] = None) -> Output[GetClientConfigResult]
Copy
func GetClientConfig(ctx *Context, opts ...InvokeOption) (*GetClientConfigResult, error)
func GetClientConfigOutput(ctx *Context, opts ...InvokeOption) GetClientConfigResultOutput
Copy

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

public static class GetClientConfig 
{
    public static Task<GetClientConfigResult> InvokeAsync(InvokeOptions? opts = null)
    public static Output<GetClientConfigResult> Invoke(InvokeOptions? opts = null)
}
Copy
public static CompletableFuture<GetClientConfigResult> getClientConfig(InvokeOptions options)
public static Output<GetClientConfigResult> getClientConfig(InvokeOptions options)
Copy
fn::invoke:
  function: azuread:index/getClientConfig:getClientConfig
  arguments:
    # arguments dictionary
Copy

getClientConfig Result

The following output properties are available:

ClientId string
The client ID (application ID) linked to the authenticated principal, or the application used for delegated authentication.
Id string
The provider-assigned unique ID for this managed resource.
ObjectId string
The object ID of the authenticated principal.
TenantId string
The tenant ID of the authenticated principal.
ClientId string
The client ID (application ID) linked to the authenticated principal, or the application used for delegated authentication.
Id string
The provider-assigned unique ID for this managed resource.
ObjectId string
The object ID of the authenticated principal.
TenantId string
The tenant ID of the authenticated principal.
clientId String
The client ID (application ID) linked to the authenticated principal, or the application used for delegated authentication.
id String
The provider-assigned unique ID for this managed resource.
objectId String
The object ID of the authenticated principal.
tenantId String
The tenant ID of the authenticated principal.
clientId string
The client ID (application ID) linked to the authenticated principal, or the application used for delegated authentication.
id string
The provider-assigned unique ID for this managed resource.
objectId string
The object ID of the authenticated principal.
tenantId string
The tenant ID of the authenticated principal.
client_id str
The client ID (application ID) linked to the authenticated principal, or the application used for delegated authentication.
id str
The provider-assigned unique ID for this managed resource.
object_id str
The object ID of the authenticated principal.
tenant_id str
The tenant ID of the authenticated principal.
clientId String
The client ID (application ID) linked to the authenticated principal, or the application used for delegated authentication.
id String
The provider-assigned unique ID for this managed resource.
objectId String
The object ID of the authenticated principal.
tenantId String
The tenant ID of the authenticated principal.

Package Details

Repository
Azure Active Directory (Azure AD) pulumi/pulumi-azuread
License
Apache-2.0
Notes
This Pulumi package is based on the azuread Terraform Provider.
Azure Active Directory (Azure AD) v6.4.0 published on Monday, Apr 7, 2025 by Pulumi