UNPKG

@pulumi/azuread

Version:

A Pulumi package for creating and managing Azure Active Directory (Azure AD) cloud resources.

102 lines 3.7 kB
"use strict"; // *** 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.getApplicationPublishedAppIdsOutput = exports.getApplicationPublishedAppIds = void 0; const pulumi = require("@pulumi/pulumi"); const utilities = require("./utilities"); /** * ## Example Usage * * *Listing well-known application IDs* * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as azuread from "@pulumi/azuread"; * * const wellKnown = azuread.getApplicationPublishedAppIds({}); * export const publishedAppIds = wellKnown.then(wellKnown => wellKnown.result); * ``` * * *Granting access to an application* * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as azuread from "@pulumi/azuread"; * * const wellKnown = azuread.getApplicationPublishedAppIds({}); * const msgraph = new azuread.ServicePrincipal("msgraph", { * clientId: wellKnown.then(wellKnown => wellKnown.result?.MicrosoftGraph), * useExisting: true, * }); * const example = new azuread.Application("example", { * displayName: "example", * requiredResourceAccesses: [{ * resourceAppId: wellKnown.then(wellKnown => wellKnown.result?.MicrosoftGraph), * resourceAccesses: [ * { * id: msgraph.appRoleIds["User.Read.All"], * type: "Role", * }, * { * id: msgraph.oauth2PermissionScopeIds["User.ReadWrite"], * type: "Scope", * }, * ], * }], * }); * ``` */ function getApplicationPublishedAppIds(opts) { opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts || {}); return pulumi.runtime.invoke("azuread:index/getApplicationPublishedAppIds:getApplicationPublishedAppIds", {}, opts); } exports.getApplicationPublishedAppIds = getApplicationPublishedAppIds; /** * ## Example Usage * * *Listing well-known application IDs* * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as azuread from "@pulumi/azuread"; * * const wellKnown = azuread.getApplicationPublishedAppIds({}); * export const publishedAppIds = wellKnown.then(wellKnown => wellKnown.result); * ``` * * *Granting access to an application* * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as azuread from "@pulumi/azuread"; * * const wellKnown = azuread.getApplicationPublishedAppIds({}); * const msgraph = new azuread.ServicePrincipal("msgraph", { * clientId: wellKnown.then(wellKnown => wellKnown.result?.MicrosoftGraph), * useExisting: true, * }); * const example = new azuread.Application("example", { * displayName: "example", * requiredResourceAccesses: [{ * resourceAppId: wellKnown.then(wellKnown => wellKnown.result?.MicrosoftGraph), * resourceAccesses: [ * { * id: msgraph.appRoleIds["User.Read.All"], * type: "Role", * }, * { * id: msgraph.oauth2PermissionScopeIds["User.ReadWrite"], * type: "Scope", * }, * ], * }], * }); * ``` */ function getApplicationPublishedAppIdsOutput(opts) { opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts || {}); return pulumi.runtime.invokeOutput("azuread:index/getApplicationPublishedAppIds:getApplicationPublishedAppIds", {}, opts); } exports.getApplicationPublishedAppIdsOutput = getApplicationPublishedAppIdsOutput; //# sourceMappingURL=getApplicationPublishedAppIds.js.map