@pulumi/azuread
Version:
A Pulumi package for creating and managing Azure Active Directory (Azure AD) cloud resources.
76 lines • 2.64 kB
JavaScript
;
// *** WARNING: this file was generated by pulumi-language-nodejs. ***
// *** Do not edit by hand unless you're certain you know what you are doing! ***
Object.defineProperty(exports, "__esModule", { value: true });
exports.getUserOutput = exports.getUser = void 0;
const pulumi = require("@pulumi/pulumi");
const utilities = require("./utilities");
/**
* Gets information about an Azure Active Directory user.
*
* ## API Permissions
*
* The following API permissions are required in order to use this data source.
*
* When authenticated with a service principal, this data source requires one of the following application roles: `User.Read.All` or `Directory.Read.All`
*
* When authenticated with a user principal, this data source does not require any additional roles.
*
* ## Example Usage
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as azuread from "@pulumi/azuread";
*
* const example = azuread.getUser({
* userPrincipalName: "user@example.com",
* });
* ```
*/
function getUser(args, opts) {
args = args || {};
opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts || {});
return pulumi.runtime.invoke("azuread:index/getUser:getUser", {
"employeeId": args.employeeId,
"mail": args.mail,
"mailNickname": args.mailNickname,
"objectId": args.objectId,
"userPrincipalName": args.userPrincipalName,
}, opts);
}
exports.getUser = getUser;
/**
* Gets information about an Azure Active Directory user.
*
* ## API Permissions
*
* The following API permissions are required in order to use this data source.
*
* When authenticated with a service principal, this data source requires one of the following application roles: `User.Read.All` or `Directory.Read.All`
*
* When authenticated with a user principal, this data source does not require any additional roles.
*
* ## Example Usage
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as azuread from "@pulumi/azuread";
*
* const example = azuread.getUser({
* userPrincipalName: "user@example.com",
* });
* ```
*/
function getUserOutput(args, opts) {
args = args || {};
opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts || {});
return pulumi.runtime.invokeOutput("azuread:index/getUser:getUser", {
"employeeId": args.employeeId,
"mail": args.mail,
"mailNickname": args.mailNickname,
"objectId": args.objectId,
"userPrincipalName": args.userPrincipalName,
}, opts);
}
exports.getUserOutput = getUserOutput;
//# sourceMappingURL=getUser.js.map