1. Packages
  2. Azure Active Directory (Azure AD)
  3. API Docs
  4. getClientConfig
Azure Active Directory (Azure AD) v5.48.0 published on Monday, Apr 15, 2024 by Pulumi

azuread.getClientConfig

Explore with Pulumi AI

azuread logo
Azure Active Directory (Azure AD) v5.48.0 published on Monday, Apr 15, 2024 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);
    
    import pulumi
    import pulumi_azuread as azuread
    
    current = azuread.get_client_config()
    pulumi.export("objectId", current.object_id)
    
    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
    	})
    }
    
    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),
        };
    });
    
    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()));
        }
    }
    
    variables:
      current:
        fn::invoke:
          Function: azuread:getClientConfig
          Arguments: {}
    outputs:
      objectId: ${current.objectId}
    

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

    > 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)
    }
    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.
    azuread logo
    Azure Active Directory (Azure AD) v5.48.0 published on Monday, Apr 15, 2024 by Pulumi