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 datawithin theWindows Azure Active DirectoryAPI.
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:
- Mail
Nicknames List<string> The email aliases of the Azure AD Users.
- Object
Ids List<string> The Object IDs of the Azure AD Users.
- User
Principal List<string>Names The User Principal Names of the Azure AD Users.
- Mail
Nicknames []string The email aliases of the Azure AD Users.
- Object
Ids []string The Object IDs of the Azure AD Users.
- User
Principal []stringNames The User Principal Names of the Azure AD Users.
- mail
Nicknames string[] The email aliases of the Azure AD Users.
- object
Ids string[] The Object IDs of the Azure AD Users.
- user
Principal string[]Names 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_ List[str]names 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.
- Mail
Nicknames List<string> The email aliases of the Azure AD Users.
- Object
Ids List<string> The Object IDs of the Azure AD Users.
- User
Principal List<string>Names The User Principal Names of the Azure AD Users.
- Id string
The provider-assigned unique ID for this managed resource.
- Mail
Nicknames []string The email aliases of the Azure AD Users.
- Object
Ids []string The Object IDs of the Azure AD Users.
- User
Principal []stringNames The User Principal Names of the Azure AD Users.
- id string
The provider-assigned unique ID for this managed resource.
- mail
Nicknames string[] The email aliases of the Azure AD Users.
- object
Ids string[] The Object IDs of the Azure AD Users.
- user
Principal string[]Names 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_ List[str]names 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
azureadTerraform Provider.