UNPKG

@pulumi/azuread

Version:

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

137 lines 5.81 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! *** var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { if (k2 === undefined) k2 = k; var desc = Object.getOwnPropertyDescriptor(m, k); if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { desc = { enumerable: true, get: function() { return m[k]; } }; } Object.defineProperty(o, k2, desc); }) : (function(o, m, k, k2) { if (k2 === undefined) k2 = k; o[k2] = m[k]; })); var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) { Object.defineProperty(o, "default", { enumerable: true, value: v }); }) : function(o, v) { o["default"] = v; }); var __importStar = (this && this.__importStar) || function (mod) { if (mod && mod.__esModule) return mod; var result = {}; if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); __setModuleDefault(result, mod); return result; }; Object.defineProperty(exports, "__esModule", { value: true }); exports.getApplicationPublishedAppIdsOutput = exports.getApplicationPublishedAppIds = void 0; const pulumi = __importStar(require("@pulumi/pulumi")); const utilities = __importStar(require("./utilities")); /** * Use this data source to discover application IDs for APIs published by Microsoft. * * This data source uses an [unofficial source of application IDs](https://github.com/hashicorp/go-azure-sdk/blob/main/sdk/environments/application_ids.go), as there is currently no available official indexed source for applications or APIs published by Microsoft. * * The app IDs returned by this data source are sourced from the Azure Global (Public) Cloud, however some of them are known to work in government and national clouds. * * ## 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; /** * Use this data source to discover application IDs for APIs published by Microsoft. * * This data source uses an [unofficial source of application IDs](https://github.com/hashicorp/go-azure-sdk/blob/main/sdk/environments/application_ids.go), as there is currently no available official indexed source for applications or APIs published by Microsoft. * * The app IDs returned by this data source are sourced from the Azure Global (Public) Cloud, however some of them are known to work in government and national clouds. * * ## 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