@pulumi/azuread
Version:
A Pulumi package for creating and managing Azure Active Directory (Azure AD) cloud resources.
103 lines (102 loc) • 3.27 kB
TypeScript
import * as pulumi from "@pulumi/pulumi";
/**
* ## 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",
* },
* ],
* }],
* });
* ```
*/
export declare function getApplicationPublishedAppIds(opts?: pulumi.InvokeOptions): Promise<GetApplicationPublishedAppIdsResult>;
/**
* A collection of values returned by getApplicationPublishedAppIds.
*/
export interface GetApplicationPublishedAppIdsResult {
/**
* The provider-assigned unique ID for this managed resource.
*/
readonly id: string;
/**
* A map of application names to application IDs.
*/
readonly result: {
[key: string]: string;
};
}
/**
* ## 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",
* },
* ],
* }],
* });
* ```
*/
export declare function getApplicationPublishedAppIdsOutput(opts?: pulumi.InvokeOutputOptions): pulumi.Output<GetApplicationPublishedAppIdsResult>;