GetUsers

Gets Object IDs or UPNs for multiple Azure Active Directory users.

NOTE: If you’re authenticating using a Service Principal then it must have permissions to Read directory data within the Windows Azure Active Directory API.

Example Usage

using Pulumi;
using AzureAD = Pulumi.AzureAD;

class MyStack : Stack
{
    public MyStack()
    {
        var users = Output.Create(AzureAD.GetUsers.InvokeAsync(new AzureAD.GetUsersArgs
        {
            UserPrincipalNames = 
            {
                "kat@hashicorp.com",
                "byte@hashicorp.com",
            },
        }));
    }

}

Coming soon!

import pulumi
import pulumi_azuread as azuread

users = azuread.get_users(user_principal_names=[
    "kat@hashicorp.com",
    "byte@hashicorp.com",
])
import * as pulumi from "@pulumi/pulumi";
import * as azuread from "@pulumi/azuread";

const users = pulumi.output(azuread.getUsers({
    userPrincipalNames: [
        "kat@hashicorp.com",
        "byte@hashicorp.com",
    ],
}, { async: true }));

Using GetUsers

function getUsers(args: GetUsersArgs, opts?: InvokeOptions): Promise<GetUsersResult>
function  get_users(mail_nicknames=None, object_ids=None, user_principal_names=None, opts=None)
func GetUsers(ctx *Context, args *GetUsersArgs, opts ...InvokeOption) (*GetUsersResult, error)
public static class GetUsers {
    public static Task<GetUsersResult> InvokeAsync(GetUsersArgs args, InvokeOptions? opts = null)
}

The following arguments are supported:

MailNicknames List<string>

The email aliases of the Azure AD Users.

ObjectIds List<string>

The Object IDs of the Azure AD Users.

UserPrincipalNames List<string>

The User Principal Names of the Azure AD Users.

MailNicknames []string

The email aliases of the Azure AD Users.

ObjectIds []string

The Object IDs of the Azure AD Users.

UserPrincipalNames []string

The User Principal Names of the Azure AD Users.

mailNicknames string[]

The email aliases of the Azure AD Users.

objectIds string[]

The Object IDs of the Azure AD Users.

userPrincipalNames string[]

The User Principal Names of the Azure AD Users.

mail_nicknames List[str]

The email aliases of the Azure AD Users.

object_ids List[str]

The Object IDs of the Azure AD Users.

user_principal_names List[str]

The User Principal Names of the Azure AD Users.

GetUsers Result

The following output properties are available:

Id string

The provider-assigned unique ID for this managed resource.

MailNicknames List<string>

The email aliases of the Azure AD Users.

ObjectIds List<string>

The Object IDs of the Azure AD Users.

UserPrincipalNames List<string>

The User Principal Names of the Azure AD Users.

Id string

The provider-assigned unique ID for this managed resource.

MailNicknames []string

The email aliases of the Azure AD Users.

ObjectIds []string

The Object IDs of the Azure AD Users.

UserPrincipalNames []string

The User Principal Names of the Azure AD Users.

id string

The provider-assigned unique ID for this managed resource.

mailNicknames string[]

The email aliases of the Azure AD Users.

objectIds string[]

The Object IDs of the Azure AD Users.

userPrincipalNames string[]

The User Principal Names of the Azure AD Users.

id str

The provider-assigned unique ID for this managed resource.

mail_nicknames List[str]

The email aliases of the Azure AD Users.

object_ids List[str]

The Object IDs of the Azure AD Users.

user_principal_names List[str]

The User Principal Names of the Azure AD Users.

Package Details

Repository
https://github.com/pulumi/pulumi-azuread
License
Apache-2.0
Notes
This Pulumi package is based on the azuread Terraform Provider.