azuread logo
Azure Active Directory (Azure AD) v5.36.0, Mar 7 23

azuread.getClientConfig

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

using System.Collections.Generic;
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),
    };
});
package main

import (
	"github.com/pulumi/pulumi-azuread/sdk/v5/go/azuread"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		current, err := azuread.GetClientConfig(ctx, nil, nil)
		if err != nil {
			return err
		}
		ctx.Export("objectId", current.ObjectId)
		return nil
	})
}
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()));
    }
}
import pulumi
import pulumi_azuread as azuread

current = azuread.get_client_config()
pulumi.export("objectId", current.object_id)
import * as pulumi from "@pulumi/pulumi";
import * as azuread from "@pulumi/azuread";

const current = azuread.getClientConfig({});
export const objectId = current.then(current => current.objectId);
variables:
  current:
    fn::invoke:
      Function: azuread:getClientConfig
      Arguments: {}
outputs:
  objectId: ${current.objectId}

Using getClientConfig

function getClientConfig(opts?: InvokeOptions): Promise<GetClientConfigResult>
def get_client_config(opts: Optional[InvokeOptions] = None) -> GetClientConfigResult
func GetClientConfig(ctx *Context, opts ...InvokeOption) (*GetClientConfigResult, error)

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

public static class GetClientConfig 
{
    public static Task<GetClientConfigResult> InvokeAsync(InvokeOptions? opts = null)
}
public static CompletableFuture<GetClientConfigResult> getClientConfig(InvokeOptions options)
// Output-based functions aren't available in Java yet
fn::invoke:
  function: azuread:index/getClientConfig:getClientConfig
  arguments:
    # arguments dictionary

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.