diff --git a/sdk/graphrbac/graph/LICENSE.txt b/sdk/graphrbac/graph/LICENSE.txt index a70e8cf66038..b73b4a1293c3 100644 --- a/sdk/graphrbac/graph/LICENSE.txt +++ b/sdk/graphrbac/graph/LICENSE.txt @@ -1,6 +1,6 @@ The MIT License (MIT) -Copyright (c) 2018 Microsoft +Copyright (c) 2019 Microsoft Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal diff --git a/sdk/graphrbac/graph/README.md b/sdk/graphrbac/graph/README.md index 0a5d7c56b308..1003a40f3b32 100644 --- a/sdk/graphrbac/graph/README.md +++ b/sdk/graphrbac/graph/README.md @@ -9,7 +9,7 @@ This package contains an isomorphic SDK for GraphRbacManagementClient. ### How to Install -``` +```bash npm install @azure/graph ``` @@ -19,13 +19,13 @@ npm install @azure/graph ##### Install @azure/ms-rest-nodeauth -``` +```bash npm install @azure/ms-rest-nodeauth ``` ##### Sample code -```ts +```typescript import * as msRest from "@azure/ms-rest-js"; import * as msRestAzure from "@azure/ms-rest-azure-js"; import * as msRestNodeAuth from "@azure/ms-rest-nodeauth"; @@ -47,7 +47,7 @@ msRestNodeAuth.interactiveLogin().then((creds) => { ##### Install @azure/ms-rest-browserauth -``` +```bash npm install @azure/ms-rest-browserauth ``` @@ -94,6 +94,3 @@ See https://github.com/Azure/ms-rest-browserauth to learn how to authenticate to ## Related projects - [Microsoft Azure SDK for Javascript](https://github.com/Azure/azure-sdk-for-js) - - -![Impressions](https://azure-sdk-impressions.azurewebsites.net/api/impressions/azure-sdk-for-js/sdk/graphrbac/graph/README.png) diff --git a/sdk/graphrbac/graph/package.json b/sdk/graphrbac/graph/package.json index c207b9aca2bf..d720afd2473b 100644 --- a/sdk/graphrbac/graph/package.json +++ b/sdk/graphrbac/graph/package.json @@ -4,8 +4,8 @@ "description": "GraphRbacManagementClient Library with typescript type definitions for node.js and browser.", "version": "4.3.0", "dependencies": { - "@azure/ms-rest-azure-js": "^1.1.0", - "@azure/ms-rest-js": "^1.1.0", + "@azure/ms-rest-azure-js": "^1.3.2", + "@azure/ms-rest-js": "^1.8.1", "tslib": "^1.9.3" }, "keywords": [ @@ -23,9 +23,10 @@ "typescript": "^3.1.1", "rollup": "^0.66.2", "rollup-plugin-node-resolve": "^3.4.0", + "rollup-plugin-sourcemaps": "^0.4.2", "uglify-js": "^3.4.9" }, - "homepage": "https://github.com/azure/azure-sdk-for-js/tree/master/sdk/graphrbac/graph", + "homepage": "https://github.com/azure/azure-sdk-for-js", "repository": { "type": "git", "url": "https://github.com/azure/azure-sdk-for-js.git" @@ -43,6 +44,7 @@ "esm/**/*.d.ts", "esm/**/*.d.ts.map", "src/**/*.ts", + "README.md", "rollup.config.js", "tsconfig.json" ], @@ -52,5 +54,5 @@ "prepack": "npm install && npm run build" }, "sideEffects": false, - "authPublish": true + "autoPublish": true } diff --git a/sdk/graphrbac/graph/rollup.config.js b/sdk/graphrbac/graph/rollup.config.js index ce8ffd7b2db8..8b52ed18d383 100644 --- a/sdk/graphrbac/graph/rollup.config.js +++ b/sdk/graphrbac/graph/rollup.config.js @@ -1,10 +1,16 @@ +import rollup from "rollup"; import nodeResolve from "rollup-plugin-node-resolve"; +import sourcemaps from "rollup-plugin-sourcemaps"; + /** - * @type {import('rollup').RollupFileOptions} + * @type {rollup.RollupFileOptions} */ const config = { - input: './esm/graphRbacManagementClient.js', - external: ["@azure/ms-rest-js", "@azure/ms-rest-azure-js"], + input: "./esm/graphRbacManagementClient.js", + external: [ + "@azure/ms-rest-js", + "@azure/ms-rest-azure-js" + ], output: { file: "./dist/graph.js", format: "umd", @@ -16,16 +22,16 @@ const config = { }, banner: `/* * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. + * Licensed under the MIT License. See License.txt in the project root for license information. * * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is - * regenerated. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. */` }, plugins: [ - nodeResolve({ module: true }) + nodeResolve({ module: true }), + sourcemaps() ] }; + export default config; diff --git a/sdk/graphrbac/graph/src/graphRbacManagementClient.ts b/sdk/graphrbac/graph/src/graphRbacManagementClient.ts index c9a03bdb6cf1..824208582344 100644 --- a/sdk/graphrbac/graph/src/graphRbacManagementClient.ts +++ b/sdk/graphrbac/graph/src/graphRbacManagementClient.ts @@ -25,7 +25,7 @@ class GraphRbacManagementClient extends GraphRbacManagementClientContext { users: operations.Users; objects: operations.Objects; domains: operations.Domains; - oAuth2: operations.OAuth2; + oAuth2PermissionGrant: operations.OAuth2PermissionGrantOperations; /** * Initializes a new instance of the GraphRbacManagementClient class. @@ -43,7 +43,7 @@ class GraphRbacManagementClient extends GraphRbacManagementClientContext { this.users = new operations.Users(this); this.objects = new operations.Objects(this); this.domains = new operations.Domains(this); - this.oAuth2 = new operations.OAuth2(this); + this.oAuth2PermissionGrant = new operations.OAuth2PermissionGrantOperations(this); } } diff --git a/sdk/graphrbac/graph/src/graphRbacManagementClientContext.ts b/sdk/graphrbac/graph/src/graphRbacManagementClientContext.ts index 6ad0e2233daa..26036f978fcd 100644 --- a/sdk/graphrbac/graph/src/graphRbacManagementClientContext.ts +++ b/sdk/graphrbac/graph/src/graphRbacManagementClientContext.ts @@ -13,7 +13,7 @@ import * as msRest from "@azure/ms-rest-js"; import * as msRestAzure from "@azure/ms-rest-azure-js"; const packageName = "@azure/graph"; -const packageVersion = "0.1.0"; +const packageVersion = "4.3.0"; export class GraphRbacManagementClientContext extends msRestAzure.AzureServiceClient { credentials: msRest.ServiceClientCredentials; diff --git a/sdk/graphrbac/graph/src/models/applicationsMappers.ts b/sdk/graphrbac/graph/src/models/applicationsMappers.ts index 2caa29495098..c548367ec3a7 100644 --- a/sdk/graphrbac/graph/src/models/applicationsMappers.ts +++ b/sdk/graphrbac/graph/src/models/applicationsMappers.ts @@ -1,35 +1,41 @@ /* * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. + * Licensed under the MIT License. See License.txt in the project root for license information. * * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is - * regenerated. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. */ export { discriminators, - ApplicationCreateParameters, - AppRole, - KeyCredential, - PasswordCredential, - RequiredResourceAccess, - ResourceAccess, + AddOwnerParameters, + ADGroup, Application, - DirectoryObject, - GraphError, + ApplicationBase, + ApplicationCreateParameters, ApplicationListResult, ApplicationUpdateParameters, + AppRole, + DirectoryObject, DirectoryObjectListResult, - AddOwnerParameters, + GraphError, + InformationalUrl, + KeyCredential, KeyCredentialListResult, KeyCredentialsUpdateParameters, + OAuth2Permission, + OptionalClaim, + OptionalClaims, + PasswordCredential, PasswordCredentialListResult, PasswordCredentialsUpdateParameters, - ADGroup, + PreAuthorizedApplication, + PreAuthorizedApplicationExtension, + PreAuthorizedApplicationPermission, + RequiredResourceAccess, + ResourceAccess, ServicePrincipal, - User, - SignInName + ServicePrincipalObjectResult, + SignInName, + User } from "../models/mappers"; - diff --git a/sdk/graphrbac/graph/src/models/deletedApplicationsMappers.ts b/sdk/graphrbac/graph/src/models/deletedApplicationsMappers.ts index 8f257066e9f6..fcaf5ced8dc2 100644 --- a/sdk/graphrbac/graph/src/models/deletedApplicationsMappers.ts +++ b/sdk/graphrbac/graph/src/models/deletedApplicationsMappers.ts @@ -1,25 +1,31 @@ /* * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. + * Licensed under the MIT License. See License.txt in the project root for license information. * * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is - * regenerated. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. */ export { discriminators, + ADGroup, Application, - DirectoryObject, + ApplicationListResult, AppRole, + DirectoryObject, + GraphError, + InformationalUrl, + KeyCredential, + OAuth2Permission, + OptionalClaim, + OptionalClaims, + PasswordCredential, + PreAuthorizedApplication, + PreAuthorizedApplicationExtension, + PreAuthorizedApplicationPermission, RequiredResourceAccess, ResourceAccess, - GraphError, - ApplicationListResult, - ADGroup, ServicePrincipal, - User, - SignInName + SignInName, + User } from "../models/mappers"; - diff --git a/sdk/graphrbac/graph/src/models/domainsMappers.ts b/sdk/graphrbac/graph/src/models/domainsMappers.ts index 9a8fe11a6c0d..b4f829df9f03 100644 --- a/sdk/graphrbac/graph/src/models/domainsMappers.ts +++ b/sdk/graphrbac/graph/src/models/domainsMappers.ts @@ -1,17 +1,14 @@ /* * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. + * Licensed under the MIT License. See License.txt in the project root for license information. * * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is - * regenerated. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. */ export { discriminators, - DomainListResult, + CloudError, Domain, - CloudError + DomainListResult } from "../models/mappers"; - diff --git a/sdk/graphrbac/graph/src/models/groupsMappers.ts b/sdk/graphrbac/graph/src/models/groupsMappers.ts index 3d00ed56ed4c..7e592f071e8e 100644 --- a/sdk/graphrbac/graph/src/models/groupsMappers.ts +++ b/sdk/graphrbac/graph/src/models/groupsMappers.ts @@ -1,33 +1,39 @@ /* * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. + * Licensed under the MIT License. See License.txt in the project root for license information. * * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is - * regenerated. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. */ export { discriminators, + AddOwnerParameters, + ADGroup, + Application, + AppRole, CheckGroupMembershipParameters, CheckGroupMembershipResult, + DirectoryObject, + DirectoryObjectListResult, GraphError, GroupAddMemberParameters, GroupCreateParameters, - ADGroup, - DirectoryObject, - GroupListResult, - DirectoryObjectListResult, GroupGetMemberGroupsParameters, GroupGetMemberGroupsResult, - AddOwnerParameters, - Application, - AppRole, + GroupListResult, + InformationalUrl, + KeyCredential, + OAuth2Permission, + OptionalClaim, + OptionalClaims, + PasswordCredential, + PreAuthorizedApplication, + PreAuthorizedApplicationExtension, + PreAuthorizedApplicationPermission, RequiredResourceAccess, ResourceAccess, ServicePrincipal, - User, - SignInName + SignInName, + User } from "../models/mappers"; - diff --git a/sdk/graphrbac/graph/src/models/index.ts b/sdk/graphrbac/graph/src/models/index.ts index e18d2325314b..96232ea07694 100644 --- a/sdk/graphrbac/graph/src/models/index.ts +++ b/sdk/graphrbac/graph/src/models/index.ts @@ -1,11 +1,9 @@ /* * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. + * Licensed under the MIT License. See License.txt in the project root for license information. * * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is - * regenerated. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. */ import { BaseResource, CloudError, AzureServiceClientOptions } from "@azure/ms-rest-azure-js"; @@ -13,20 +11,166 @@ import * as msRest from "@azure/ms-rest-js"; export { BaseResource, CloudError }; +/** + * Represents a group of URIs that provide terms of service, marketing, support and privacy policy + * information about an application. The default value for each string is null. + */ +export interface InformationalUrl { + /** + * The terms of service URI + */ + termsOfService?: string; + /** + * The marketing URI + */ + marketing?: string; + /** + * The privacy policy URI + */ + privacy?: string; + /** + * The support URI + */ + support?: string; +} + +/** + * Represents an OAuth 2.0 delegated permission scope. The specified OAuth 2.0 delegated permission + * scopes may be requested by client applications (through the requiredResourceAccess collection on + * the Application object) when calling a resource application. The oauth2Permissions property of + * the ServicePrincipal entity and of the Application entity is a collection of OAuth2Permission. + */ +export interface OAuth2Permission { + /** + * Permission help text that appears in the admin consent and app assignment experiences. + */ + adminConsentDescription?: string; + /** + * Display name for the permission that appears in the admin consent and app assignment + * experiences. + */ + adminConsentDisplayName?: string; + /** + * Unique scope permission identifier inside the oauth2Permissions collection. + */ + id?: string; + /** + * When creating or updating a permission, this property must be set to true (which is the + * default). To delete a permission, this property must first be set to false. At that point, in + * a subsequent call, the permission may be removed. + */ + isEnabled?: boolean; + /** + * Specifies whether this scope permission can be consented to by an end user, or whether it is a + * tenant-wide permission that must be consented to by a Company Administrator. Possible values + * are "User" or "Admin". + */ + type?: string; + /** + * Permission help text that appears in the end user consent experience. + */ + userConsentDescription?: string; + /** + * Display name for the permission that appears in the end user consent experience. + */ + userConsentDisplayName?: string; + /** + * The value of the scope claim that the resource application should expect in the OAuth 2.0 + * access token. + */ + value?: string; +} + +/** + * Specifying the claims to be included in a token. + */ +export interface OptionalClaim { + /** + * Claim name. + */ + name?: string; + /** + * Claim source. + */ + source?: string; + /** + * Is this a required claim. + */ + essential?: boolean; + additionalProperties?: any; +} + +/** + * Specifying the claims to be included in the token. + */ +export interface OptionalClaims { + /** + * Optional claims requested to be included in the id token. + */ + idToken?: OptionalClaim[]; + /** + * Optional claims requested to be included in the access token. + */ + accessToken?: OptionalClaim[]; + /** + * Optional claims requested to be included in the saml token. + */ + samlToken?: OptionalClaim[]; +} + +/** + * Contains information about the pre-authorized permissions. + */ +export interface PreAuthorizedApplicationPermission { + /** + * Indicates whether the permission set is DirectAccess or impersonation. + */ + directAccessGrant?: boolean; + /** + * The list of permissions. + */ + accessGrants?: string[]; +} + +/** + * Representation of an app PreAuthorizedApplicationExtension required by a pre authorized client + * app. + */ +export interface PreAuthorizedApplicationExtension { + /** + * The extension's conditions. + */ + conditions?: string[]; +} + +/** + * Contains information about pre authorized client application. + */ +export interface PreAuthorizedApplication { + /** + * Represents the application id. + */ + appId?: string; + /** + * Collection of required app permissions/entitlements from the resource application. + */ + permissions?: PreAuthorizedApplicationPermission[]; + /** + * Collection of extensions from the resource application. + */ + extensions?: PreAuthorizedApplicationExtension[]; +} /** - * @interface - * An interface representing GraphError. * Active Directory error information. - * */ export interface GraphError { /** - * @member {string} [code] Error code. + * Error code. */ code?: string; /** - * @member {string} [message] Error message value. + * Error message value. */ message?: string; } @@ -37,1332 +181,1266 @@ export interface GraphError { export type DirectoryObjectUnion = DirectoryObject | Application | ADGroup | ServicePrincipal | User; /** - * @interface - * An interface representing DirectoryObject. * Represents an Azure Active Directory object. - * */ export interface DirectoryObject { /** - * @member {string} objectType Polymorphic Discriminator + * Polymorphic Discriminator */ objectType: "DirectoryObject"; /** - * @member {string} [objectId] The object ID. - * **NOTE: This property will not be serialized. It can only be populated by - * the server.** + * The object ID. + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ readonly objectId?: string; /** - * @member {Date} [deletionTimestamp] The time at which the directory object - * was deleted. - * **NOTE: This property will not be serialized. It can only be populated by - * the server.** + * The time at which the directory object was deleted. + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ readonly deletionTimestamp?: Date; /** - * @property Describes unknown properties. The value of an unknown property - * can be of "any" type. + * Describes unknown properties. The value of an unknown property can be of "any" type. */ [property: string]: any; } /** - * @interface - * An interface representing KeyCredential. * Active Directory Key Credential information. - * */ export interface KeyCredential { /** - * @member {Date} [startDate] Start date. + * Start date. */ startDate?: Date; /** - * @member {Date} [endDate] End date. + * End date. */ endDate?: Date; /** - * @member {string} [value] Key value. + * Key value. */ value?: string; /** - * @member {string} [keyId] Key ID. + * Key ID. */ keyId?: string; /** - * @member {string} [usage] Usage. Acceptable values are 'Verify' and 'Sign'. + * Usage. Acceptable values are 'Verify' and 'Sign'. */ usage?: string; /** - * @member {string} [type] Type. Acceptable values are 'AsymmetricX509Cert' - * and 'Symmetric'. + * Type. Acceptable values are 'AsymmetricX509Cert' and 'Symmetric'. */ type?: string; /** - * @member {Uint8Array} [customKeyIdentifier] Custom Key Identifier + * Custom Key Identifier */ - customKeyIdentifier?: Uint8Array; + customKeyIdentifier?: string; /** - * @property Describes unknown properties. The value of an unknown property - * can be of "any" type. + * Describes unknown properties. The value of an unknown property can be of "any" type. */ [property: string]: any; } /** - * @interface - * An interface representing PasswordCredential. * Active Directory Password Credential information. - * */ export interface PasswordCredential { /** - * @member {Date} [startDate] Start date. + * Start date. */ startDate?: Date; /** - * @member {Date} [endDate] End date. + * End date. */ endDate?: Date; /** - * @member {string} [keyId] Key ID. + * Key ID. */ keyId?: string; /** - * @member {string} [value] Key value. + * Key value. */ value?: string; /** - * @property Describes unknown properties. The value of an unknown property - * can be of "any" type. + * Custom Key Identifier + */ + customKeyIdentifier?: Uint8Array; + /** + * Describes unknown properties. The value of an unknown property can be of "any" type. */ [property: string]: any; } /** - * @interface - * An interface representing ResourceAccess. - * Specifies an OAuth 2.0 permission scope or an app role that an application - * requires. The resourceAccess property of the RequiredResourceAccess type is - * a collection of ResourceAccess. - * + * Specifies an OAuth 2.0 permission scope or an app role that an application requires. The + * resourceAccess property of the RequiredResourceAccess type is a collection of ResourceAccess. */ export interface ResourceAccess { /** - * @member {string} id The unique identifier for one of the OAuth2Permission - * or AppRole instances that the resource application exposes. + * The unique identifier for one of the OAuth2Permission or AppRole instances that the resource + * application exposes. */ id: string; /** - * @member {string} [type] Specifies whether the id property references an - * OAuth2Permission or an AppRole. Possible values are "scope" or "role". + * Specifies whether the id property references an OAuth2Permission or an AppRole. Possible + * values are "scope" or "role". */ type?: string; /** - * @property Describes unknown properties. The value of an unknown property - * can be of "any" type. + * Describes unknown properties. The value of an unknown property can be of "any" type. */ [property: string]: any; } /** - * @interface - * An interface representing RequiredResourceAccess. - * Specifies the set of OAuth 2.0 permission scopes and app roles under the - * specified resource that an application requires access to. The specified - * OAuth 2.0 permission scopes may be requested by client applications (through - * the requiredResourceAccess collection) when calling a resource application. - * The requiredResourceAccess property of the Application entity is a - * collection of ReqiredResourceAccess. - * + * Specifies the set of OAuth 2.0 permission scopes and app roles under the specified resource that + * an application requires access to. The specified OAuth 2.0 permission scopes may be requested by + * client applications (through the requiredResourceAccess collection) when calling a resource + * application. The requiredResourceAccess property of the Application entity is a collection of + * RequiredResourceAccess. */ export interface RequiredResourceAccess { /** - * @member {ResourceAccess[]} resourceAccess The list of OAuth2.0 permission - * scopes and app roles that the application requires from the specified - * resource. + * The list of OAuth2.0 permission scopes and app roles that the application requires from the + * specified resource. */ resourceAccess: ResourceAccess[]; /** - * @member {string} [resourceAppId] The unique identifier for the resource - * that the application requires access to. This should be equal to the appId - * declared on the target resource application. + * The unique identifier for the resource that the application requires access to. This should be + * equal to the appId declared on the target resource application. */ resourceAppId?: string; /** - * @property Describes unknown properties. The value of an unknown property - * can be of "any" type. + * Describes unknown properties. The value of an unknown property can be of "any" type. */ [property: string]: any; } /** - * @interface * An interface representing AppRole. */ export interface AppRole { /** - * @member {string} [id] Unique role identifier inside the appRoles - * collection. + * Unique role identifier inside the appRoles collection. */ id?: string; /** - * @member {string[]} [allowedMemberTypes] Specifies whether this app role - * definition can be assigned to users and groups by setting to 'User', or to - * other applications (that are accessing this application in daemon service + * Specifies whether this app role definition can be assigned to users and groups by setting to + * 'User', or to other applications (that are accessing this application in daemon service * scenarios) by setting to 'Application', or to both. */ allowedMemberTypes?: string[]; /** - * @member {string} [description] Permission help text that appears in the - * admin app assignment and consent experiences. + * Permission help text that appears in the admin app assignment and consent experiences. */ description?: string; /** - * @member {string} [displayName] Display name for the permission that - * appears in the admin consent and app assignment experiences. + * Display name for the permission that appears in the admin consent and app assignment + * experiences. */ displayName?: string; /** - * @member {boolean} [isEnabled] When creating or updating a role definition, - * this must be set to true (which is the default). To delete a role, this - * must first be set to false. At that point, in a subsequent call, this role - * may be removed. + * When creating or updating a role definition, this must be set to true (which is the default). + * To delete a role, this must first be set to false. At that point, in a subsequent call, this + * role may be removed. */ isEnabled?: boolean; /** - * @member {string} [value] Specifies the value of the roles claim that the - * application should expect in the authentication and access tokens. + * Specifies the value of the roles claim that the application should expect in the + * authentication and access tokens. */ value?: string; } /** - * @interface - * An interface representing ApplicationCreateParameters. - * Request parameters for creating a new application. - * + * Active Directive Application common properties shared among GET, POST and PATCH */ -export interface ApplicationCreateParameters { +export interface ApplicationBase { + /** + * A property on the application to indicate if the application accepts other IDPs or not or + * partially accepts. + */ + allowGuestsSignIn?: boolean; + /** + * Indicates that the application supports pass through users who have no presence in the + * resource tenant. + */ + allowPassthroughUsers?: boolean; + /** + * The url for the application logo image stored in a CDN. + */ + appLogoUrl?: string; /** - * @member {AppRole[]} [appRoles] The collection of application roles that an - * application may declare. These roles can be assigned to users, groups or - * service principals. + * The collection of application roles that an application may declare. These roles can be + * assigned to users, groups or service principals. */ appRoles?: AppRole[]; /** - * @member {boolean} availableToOtherTenants Whether the application is - * available to other tenants. + * The application permissions. */ - availableToOtherTenants: boolean; + appPermissions?: string[]; /** - * @member {string} displayName The display name of the application. + * Whether the application is available to other tenants. */ - displayName: string; + availableToOtherTenants?: boolean; + /** + * A URL provided by the author of the application to report errors when using the application. + */ + errorUrl?: string; + /** + * Configures the groups claim issued in a user or OAuth 2.0 access token that the app expects. + */ + groupMembershipClaims?: any; /** - * @member {string} [homepage] The home page of the application. + * The home page of the application. */ homepage?: string; /** - * @member {string[]} identifierUris A collection of URIs for the - * application. + * URLs with more information about the application. */ - identifierUris: string[]; + informationalUrls?: InformationalUrl; /** - * @member {string[]} [replyUrls] A collection of reply URLs for the - * application. + * Specifies whether this application supports device authentication without a user. The default + * is false. */ - replyUrls?: string[]; + isDeviceOnlyAuthSupported?: boolean; /** - * @member {KeyCredential[]} [keyCredentials] The list of KeyCredential - * objects. + * A collection of KeyCredential objects. */ keyCredentials?: KeyCredential[]; /** - * @member {PasswordCredential[]} [passwordCredentials] The list of - * PasswordCredential objects. + * Client applications that are tied to this resource application. Consent to any of the known + * client applications will result in implicit consent to the resource application through a + * combined consent dialog (showing the OAuth permission scopes required by the client and the + * resource). */ - passwordCredentials?: PasswordCredential[]; + knownClientApplications?: string[]; /** - * @member {boolean} [oauth2AllowImplicitFlow] Whether to allow implicit - * grant flow for OAuth2 + * the url of the logout page + */ + logoutUrl?: string; + /** + * Whether to allow implicit grant flow for OAuth2 */ oauth2AllowImplicitFlow?: boolean; /** - * @member {RequiredResourceAccess[]} [requiredResourceAccess] Specifies - * resources that this application requires access to and the set of OAuth - * permission scopes and application roles that it needs under each of those - * resources. This pre-configuration of required resource access drives the - * consent experience. + * Specifies whether during a token Request Azure AD will allow path matching of the redirect URI + * against the applications collection of replyURLs. The default is false. */ - requiredResourceAccess?: RequiredResourceAccess[]; + oauth2AllowUrlPathMatching?: boolean; /** - * @property Describes unknown properties. The value of an unknown property - * can be of "any" type. + * The collection of OAuth 2.0 permission scopes that the web API (resource) application exposes + * to client applications. These permission scopes may be granted to client applications during + * consent. */ - [property: string]: any; -} - -/** - * @interface - * An interface representing ApplicationUpdateParameters. - * Request parameters for updating an existing application. - * - */ -export interface ApplicationUpdateParameters { + oauth2Permissions?: OAuth2Permission[]; /** - * @member {AppRole[]} [appRoles] The collection of application roles that an - * application may declare. These roles can be assigned to users, groups or - * service principals. + * Specifies whether, as part of OAuth 2.0 token requests, Azure AD will allow POST requests, as + * opposed to GET requests. The default is false, which specifies that only GET requests will be + * allowed. */ - appRoles?: AppRole[]; + oauth2RequirePostResponse?: boolean; /** - * @member {boolean} [availableToOtherTenants] Whether the application is - * available to other tenants + * A list of tenants allowed to access application. */ - availableToOtherTenants?: boolean; + orgRestrictions?: string[]; + optionalClaims?: OptionalClaims; /** - * @member {string} [displayName] The display name of the application. + * A collection of PasswordCredential objects */ - displayName?: string; + passwordCredentials?: PasswordCredential[]; /** - * @member {string} [homepage] The home page of the application. + * list of pre-authorized applications. */ - homepage?: string; + preAuthorizedApplications?: PreAuthorizedApplication[]; /** - * @member {string[]} [identifierUris] A collection of URIs for the - * application. + * Specifies whether this application is a public client (such as an installed application + * running on a mobile device). Default is false. */ - identifierUris?: string[]; + publicClient?: boolean; /** - * @member {string[]} [replyUrls] A collection of reply URLs for the - * application. + * Reliable domain which can be used to identify an application. + */ + publisherDomain?: string; + /** + * A collection of reply URLs for the application. */ replyUrls?: string[]; /** - * @member {KeyCredential[]} [keyCredentials] The list of KeyCredential - * objects. + * Specifies resources that this application requires access to and the set of OAuth permission + * scopes and application roles that it needs under each of those resources. This + * pre-configuration of required resource access drives the consent experience. */ - keyCredentials?: KeyCredential[]; + requiredResourceAccess?: RequiredResourceAccess[]; /** - * @member {PasswordCredential[]} [passwordCredentials] The list of - * PasswordCredential objects. + * The URL to the SAML metadata for the application. */ - passwordCredentials?: PasswordCredential[]; + samlMetadataUrl?: string; /** - * @member {boolean} [oauth2AllowImplicitFlow] Whether to allow implicit - * grant flow for OAuth2 + * Audience for signing in to the application (AzureADMyOrganization, AzureADAllOrganizations, + * AzureADAndMicrosoftAccounts). */ - oauth2AllowImplicitFlow?: boolean; + signInAudience?: string; /** - * @member {RequiredResourceAccess[]} [requiredResourceAccess] Specifies - * resources that this application requires access to and the set of OAuth - * permission scopes and application roles that it needs under each of those - * resources. This pre-configuration of required resource access drives the - * consent experience. + * The primary Web page. */ - requiredResourceAccess?: RequiredResourceAccess[]; + wwwHomepage?: string; +} + +/** + * Request parameters for creating a new application. + */ +export interface ApplicationCreateParameters extends ApplicationBase { /** - * @property Describes unknown properties. The value of an unknown property - * can be of "any" type. + * The display name of the application. */ - [property: string]: any; + displayName: string; + /** + * A collection of URIs for the application. + */ + identifierUris?: string[]; +} + +/** + * Request parameters for updating a new application. + */ +export interface ApplicationUpdateParameters extends ApplicationBase { + /** + * The display name of the application. + */ + displayName?: string; + /** + * A collection of URIs for the application. + */ + identifierUris?: string[]; } /** - * @interface - * An interface representing Application. * Active Directory application information. - * */ export interface Application { /** - * @member {string} objectType Polymorphic Discriminator + * Polymorphic Discriminator */ objectType: "Application"; /** - * @member {string} [objectId] The object ID. - * **NOTE: This property will not be serialized. It can only be populated by - * the server.** + * The object ID. + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ readonly objectId?: string; /** - * @member {Date} [deletionTimestamp] The time at which the directory object - * was deleted. - * **NOTE: This property will not be serialized. It can only be populated by - * the server.** + * The time at which the directory object was deleted. + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ readonly deletionTimestamp?: Date; /** - * @member {string} [appId] The application ID. + * The application ID. */ appId?: string; /** - * @member {AppRole[]} [appRoles] The collection of application roles that an - * application may declare. These roles can be assigned to users, groups or - * service principals. + * A property on the application to indicate if the application accepts other IDPs or not or + * partially accepts. + */ + allowGuestsSignIn?: boolean; + /** + * Indicates that the application supports pass through users who have no presence in the + * resource tenant. + */ + allowPassthroughUsers?: boolean; + /** + * The url for the application logo image stored in a CDN. + */ + appLogoUrl?: string; + /** + * The collection of application roles that an application may declare. These roles can be + * assigned to users, groups or service principals. */ appRoles?: AppRole[]; /** - * @member {string[]} [appPermissions] The application permissions. + * The application permissions. */ appPermissions?: string[]; /** - * @member {boolean} [availableToOtherTenants] Whether the application is be - * available to other tenants. + * Whether the application is available to other tenants. */ availableToOtherTenants?: boolean; /** - * @member {string} [displayName] The display name of the application. + * The display name of the application. */ displayName?: string; /** - * @member {string[]} [identifierUris] A collection of URIs for the - * application. + * A URL provided by the author of the application to report errors when using the application. */ - identifierUris?: string[]; + errorUrl?: string; /** - * @member {string[]} [replyUrls] A collection of reply URLs for the - * application. + * Configures the groups claim issued in a user or OAuth 2.0 access token that the app expects. */ - replyUrls?: string[]; + groupMembershipClaims?: any; /** - * @member {string} [homepage] The home page of the application. + * The home page of the application. */ homepage?: string; /** - * @member {boolean} [oauth2AllowImplicitFlow] Whether to allow implicit - * grant flow for OAuth2 + * A collection of URIs for the application. + */ + identifierUris?: string[]; + /** + * URLs with more information about the application. + */ + informationalUrls?: InformationalUrl; + /** + * Specifies whether this application supports device authentication without a user. The default + * is false. + */ + isDeviceOnlyAuthSupported?: boolean; + /** + * A collection of KeyCredential objects. + */ + keyCredentials?: KeyCredential[]; + /** + * Client applications that are tied to this resource application. Consent to any of the known + * client applications will result in implicit consent to the resource application through a + * combined consent dialog (showing the OAuth permission scopes required by the client and the + * resource). + */ + knownClientApplications?: string[]; + /** + * the url of the logout page + */ + logoutUrl?: string; + /** + * Whether to allow implicit grant flow for OAuth2 */ oauth2AllowImplicitFlow?: boolean; /** - * @member {RequiredResourceAccess[]} [requiredResourceAccess] Specifies - * resources that this application requires access to and the set of OAuth - * permission scopes and application roles that it needs under each of those - * resources. This pre-configuration of required resource access drives the - * consent experience. + * Specifies whether during a token Request Azure AD will allow path matching of the redirect URI + * against the applications collection of replyURLs. The default is false. + */ + oauth2AllowUrlPathMatching?: boolean; + /** + * The collection of OAuth 2.0 permission scopes that the web API (resource) application exposes + * to client applications. These permission scopes may be granted to client applications during + * consent. + */ + oauth2Permissions?: OAuth2Permission[]; + /** + * Specifies whether, as part of OAuth 2.0 token requests, Azure AD will allow POST requests, as + * opposed to GET requests. The default is false, which specifies that only GET requests will be + * allowed. + */ + oauth2RequirePostResponse?: boolean; + /** + * A list of tenants allowed to access application. + */ + orgRestrictions?: string[]; + optionalClaims?: OptionalClaims; + /** + * A collection of PasswordCredential objects + */ + passwordCredentials?: PasswordCredential[]; + /** + * list of pre-authorized applications. + */ + preAuthorizedApplications?: PreAuthorizedApplication[]; + /** + * Specifies whether this application is a public client (such as an installed application + * running on a mobile device). Default is false. + */ + publicClient?: boolean; + /** + * Reliable domain which can be used to identify an application. + */ + publisherDomain?: string; + /** + * A collection of reply URLs for the application. + */ + replyUrls?: string[]; + /** + * Specifies resources that this application requires access to and the set of OAuth permission + * scopes and application roles that it needs under each of those resources. This + * pre-configuration of required resource access drives the consent experience. */ requiredResourceAccess?: RequiredResourceAccess[]; + /** + * The URL to the SAML metadata for the application. + */ + samlMetadataUrl?: string; + /** + * Audience for signing in to the application (AzureADMyOrganization, AzureADAllOrganizations, + * AzureADAndMicrosoftAccounts). + */ + signInAudience?: string; + /** + * The primary Web page. + */ + wwwHomepage?: string; +} + +/** + * Service Principal Object Result. + */ +export interface ServicePrincipalObjectResult { + /** + * The Object ID of the service principal with the specified application ID. + */ + value?: string; + /** + * The URL representing edm equivalent. + */ + odatametadata?: string; } /** - * @interface - * An interface representing AddOwnerParameters. * Request parameters for adding a owner to an application. - * */ export interface AddOwnerParameters { /** - * @member {string} url A owner object URL, such as + * A owner object URL, such as * "https://graph.windows.net/0b1f9851-1bf0-433f-aec3-cb9272f093dc/directoryObjects/f260bbc4-c254-447b-94cf-293b5ec434dd", * where "0b1f9851-1bf0-433f-aec3-cb9272f093dc" is the tenantId and - * "f260bbc4-c254-447b-94cf-293b5ec434dd" is the objectId of the owner (user, - * application, servicePrincipal, group) to be added. + * "f260bbc4-c254-447b-94cf-293b5ec434dd" is the objectId of the owner (user, application, + * servicePrincipal, group) to be added. */ url: string; /** - * @property Describes unknown properties. The value of an unknown property - * can be of "any" type. + * Describes unknown properties. The value of an unknown property can be of "any" type. */ [property: string]: any; } /** - * @interface - * An interface representing KeyCredentialsUpdateParameters. * Request parameters for a KeyCredentials update operation - * */ export interface KeyCredentialsUpdateParameters { /** - * @member {KeyCredential[]} value A collection of KeyCredentials. + * A collection of KeyCredentials. */ value: KeyCredential[]; } /** - * @interface - * An interface representing PasswordCredentialsUpdateParameters. * Request parameters for a PasswordCredentials update operation. - * */ export interface PasswordCredentialsUpdateParameters { /** - * @member {PasswordCredential[]} value A collection of PasswordCredentials. + * A collection of PasswordCredentials. */ value: PasswordCredential[]; } /** - * @interface - * An interface representing GroupAddMemberParameters. * Request parameters for adding a member to a group. - * */ export interface GroupAddMemberParameters { /** - * @member {string} url A member object URL, such as + * A member object URL, such as * "https://graph.windows.net/0b1f9851-1bf0-433f-aec3-cb9272f093dc/directoryObjects/f260bbc4-c254-447b-94cf-293b5ec434dd", * where "0b1f9851-1bf0-433f-aec3-cb9272f093dc" is the tenantId and - * "f260bbc4-c254-447b-94cf-293b5ec434dd" is the objectId of the member - * (user, application, servicePrincipal, group) to be added. + * "f260bbc4-c254-447b-94cf-293b5ec434dd" is the objectId of the member (user, application, + * servicePrincipal, group) to be added. */ url: string; /** - * @property Describes unknown properties. The value of an unknown property - * can be of "any" type. + * Describes unknown properties. The value of an unknown property can be of "any" type. */ [property: string]: any; } /** - * @interface - * An interface representing GroupCreateParameters. * Request parameters for creating a new group. - * */ export interface GroupCreateParameters { /** - * @member {string} displayName Group display name + * Group display name */ displayName: string; /** - * @member {string} mailNickname Mail nickname + * Mail nickname */ mailNickname: string; /** - * @property Describes unknown properties. The value of an unknown property - * can be of "any" type. + * Describes unknown properties. The value of an unknown property can be of "any" type. */ [property: string]: any; } /** - * @interface - * An interface representing ADGroup. * Active Directory group information. - * */ export interface ADGroup { /** - * @member {string} objectType Polymorphic Discriminator + * Polymorphic Discriminator */ objectType: "Group"; /** - * @member {string} [objectId] The object ID. - * **NOTE: This property will not be serialized. It can only be populated by - * the server.** + * The object ID. + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ readonly objectId?: string; /** - * @member {Date} [deletionTimestamp] The time at which the directory object - * was deleted. - * **NOTE: This property will not be serialized. It can only be populated by - * the server.** + * The time at which the directory object was deleted. + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ readonly deletionTimestamp?: Date; /** - * @member {string} [displayName] The display name of the group. + * The display name of the group. */ displayName?: string; /** - * @member {boolean} [mailEnabled] Whether the group is mail-enabled. Must be - * false. This is because only pure security groups can be created using the - * Graph API. + * Whether the group is mail-enabled. Must be false. This is because only pure security groups + * can be created using the Graph API. */ mailEnabled?: boolean; /** - * @member {string} [mailNickname] The mail alias for the group. + * The mail alias for the group. */ mailNickname?: string; /** - * @member {boolean} [securityEnabled] Whether the group is security-enable. + * Whether the group is security-enable. */ securityEnabled?: boolean; /** - * @member {string} [mail] The primary email address of the group. + * The primary email address of the group. */ mail?: string; } /** - * @interface - * An interface representing GroupGetMemberGroupsParameters. * Request parameters for GetMemberGroups API call. - * */ export interface GroupGetMemberGroupsParameters { /** - * @member {boolean} securityEnabledOnly If true, only membership in - * security-enabled groups should be checked. Otherwise, membership in all - * groups should be checked. + * If true, only membership in security-enabled groups should be checked. Otherwise, membership + * in all groups should be checked. */ securityEnabledOnly: boolean; /** - * @property Describes unknown properties. The value of an unknown property - * can be of "any" type. + * Describes unknown properties. The value of an unknown property can be of "any" type. */ [property: string]: any; } /** - * @interface - * An interface representing CheckGroupMembershipParameters. * Request parameters for IsMemberOf API call. - * */ export interface CheckGroupMembershipParameters { /** - * @member {string} groupId The object ID of the group to check. + * The object ID of the group to check. */ groupId: string; /** - * @member {string} memberId The object ID of the contact, group, user, or - * service principal to check for membership in the specified group. + * The object ID of the contact, group, user, or service principal to check for membership in the + * specified group. */ memberId: string; /** - * @property Describes unknown properties. The value of an unknown property - * can be of "any" type. + * Describes unknown properties. The value of an unknown property can be of "any" type. */ [property: string]: any; } /** - * @interface - * An interface representing CheckGroupMembershipResult. * Server response for IsMemberOf API call - * */ export interface CheckGroupMembershipResult { /** - * @member {boolean} [value] True if the specified user, group, contact, or - * service principal has either direct or transitive membership in the - * specified group; otherwise, false. + * True if the specified user, group, contact, or service principal has either direct or + * transitive membership in the specified group; otherwise, false. */ value?: boolean; /** - * @property Describes unknown properties. The value of an unknown property - * can be of "any" type. + * Describes unknown properties. The value of an unknown property can be of "any" type. */ [property: string]: any; } /** - * @interface - * An interface representing ServicePrincipalCreateParameters. - * Request parameters for creating a new service principal. - * + * Active Directory service principal common properties shared among GET, POST and PATCH */ -export interface ServicePrincipalCreateParameters { +export interface ServicePrincipalBase { /** - * @member {boolean} [accountEnabled] Whether the account is enabled + * whether or not the service principal account is enabled */ accountEnabled?: boolean; /** - * @member {string} appId application Id - */ - appId: string; - /** - * @member {boolean} [appRoleAssignmentRequired] Specifies whether an - * AppRoleAssignment to a user or group is required before Azure AD will + * Specifies whether an AppRoleAssignment to a user or group is required before Azure AD will * issue a user or access token to the application. */ appRoleAssignmentRequired?: boolean; /** - * @member {string} [displayName] The display name for the service principal. + * The collection of key credentials associated with the service principal. */ - displayName?: string; + keyCredentials?: KeyCredential[]; /** - * @member {string} [errorUrl] + * The collection of password credentials associated with the service principal. */ - errorUrl?: string; + passwordCredentials?: PasswordCredential[]; /** - * @member {string} [homepage] The URL to the homepage of the associated - * application. + * the type of the service principal */ - homepage?: string; + servicePrincipalType?: string; /** - * @member {KeyCredential[]} [keyCredentials] A collection of KeyCredential - * objects. + * Optional list of tags that you can apply to your service principals. Not nullable. */ - keyCredentials?: KeyCredential[]; + tags?: string[]; +} + +/** + * Request parameters for creating a new service principal. + */ +export interface ServicePrincipalCreateParameters extends ServicePrincipalBase { /** - * @member {PasswordCredential[]} [passwordCredentials] A collection of - * PasswordCredential objects + * The application ID. */ - passwordCredentials?: PasswordCredential[]; + appId: string; +} + +/** + * Request parameters for update an existing service principal. + */ +export interface ServicePrincipalUpdateParameters extends ServicePrincipalBase { +} + +/** + * Active Directory service principal information. + */ +export interface ServicePrincipal { /** - * @member {string} [publisherName] The display name of the tenant in which - * the associated application is specified. + * Polymorphic Discriminator */ - publisherName?: string; + objectType: "ServicePrincipal"; /** - * @member {string[]} [replyUrls] A collection of reply URLs for the service - * principal. + * The object ID. + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ - replyUrls?: string[]; + readonly objectId?: string; /** - * @member {string} [samlMetadataUrl] + * The time at which the directory object was deleted. + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ - samlMetadataUrl?: string; + readonly deletionTimestamp?: Date; /** - * @member {string[]} [servicePrincipalNames] A collection of service - * principal names. + * whether or not the service principal account is enabled */ - servicePrincipalNames?: string[]; + accountEnabled?: boolean; /** - * @member {string[]} [tags] + * alternative names */ - tags?: string[]; + alternativeNames?: string[]; /** - * @property Describes unknown properties. The value of an unknown property - * can be of "any" type. + * The display name exposed by the associated application. + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ - [property: string]: any; -} - -/** - * @interface - * An interface representing ServicePrincipalUpdateParameters. - * Request parameters for creating a new service principal. - * - */ -export interface ServicePrincipalUpdateParameters { + readonly appDisplayName?: string; /** - * @member {boolean} [accountEnabled] Whether the account is enabled + * The application ID. */ - accountEnabled?: boolean; + appId?: string; /** - * @member {string} [appId] application Id + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ - appId?: string; + readonly appOwnerTenantId?: string; /** - * @member {boolean} [appRoleAssignmentRequired] Specifies whether an - * AppRoleAssignment to a user or group is required before Azure AD will + * Specifies whether an AppRoleAssignment to a user or group is required before Azure AD will * issue a user or access token to the application. */ appRoleAssignmentRequired?: boolean; /** - * @member {string} [displayName] The display name for the service principal. + * The collection of application roles that an application may declare. These roles can be + * assigned to users, groups or service principals. + */ + appRoles?: AppRole[]; + /** + * The display name of the service principal. */ displayName?: string; /** - * @member {string} [errorUrl] + * A URL provided by the author of the associated application to report errors when using the + * application. */ errorUrl?: string; /** - * @member {string} [homepage] The URL to the homepage of the associated - * application. + * The URL to the homepage of the associated application. */ homepage?: string; /** - * @member {KeyCredential[]} [keyCredentials] A collection of KeyCredential - * objects. + * The collection of key credentials associated with the service principal. */ keyCredentials?: KeyCredential[]; /** - * @member {PasswordCredential[]} [passwordCredentials] A collection of - * PasswordCredential objects + * A URL provided by the author of the associated application to logout */ - passwordCredentials?: PasswordCredential[]; - /** - * @member {string} [publisherName] The display name of the tenant in which - * the associated application is specified. - */ - publisherName?: string; + logoutUrl?: string; /** - * @member {string[]} [replyUrls] A collection of reply URLs for the service - * principal. + * The OAuth 2.0 permissions exposed by the associated application. + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ - replyUrls?: string[]; - /** - * @member {string} [samlMetadataUrl] - */ - samlMetadataUrl?: string; + readonly oauth2Permissions?: OAuth2Permission[]; /** - * @member {string[]} [servicePrincipalNames] A collection of service - * principal names. + * The collection of password credentials associated with the service principal. */ - servicePrincipalNames?: string[]; - /** - * @member {string[]} [tags] - */ - tags?: string[]; - /** - * @property Describes unknown properties. The value of an unknown property - * can be of "any" type. - */ - [property: string]: any; -} - -/** - * @interface - * An interface representing ServicePrincipal. - * Active Directory service principal information. - * - */ -export interface ServicePrincipal { + passwordCredentials?: PasswordCredential[]; /** - * @member {string} objectType Polymorphic Discriminator + * The thumbprint of preferred certificate to sign the token */ - objectType: "ServicePrincipal"; + preferredTokenSigningKeyThumbprint?: string; /** - * @member {string} [objectId] The object ID. - * **NOTE: This property will not be serialized. It can only be populated by - * the server.** + * The publisher's name of the associated application */ - readonly objectId?: string; + publisherName?: string; /** - * @member {Date} [deletionTimestamp] The time at which the directory object - * was deleted. - * **NOTE: This property will not be serialized. It can only be populated by - * the server.** + * The URLs that user tokens are sent to for sign in with the associated application. The + * redirect URIs that the oAuth 2.0 authorization code and access tokens are sent to for the + * associated application. */ - readonly deletionTimestamp?: Date; + replyUrls?: string[]; /** - * @member {string} [displayName] The display name of the service principal. + * The URL to the SAML metadata of the associated application */ - displayName?: string; + samlMetadataUrl?: string; /** - * @member {string} [appId] The application ID. + * A collection of service principal names. */ - appId?: string; + servicePrincipalNames?: string[]; /** - * @member {AppRole[]} [appRoles] The collection of application roles that an - * application may declare. These roles can be assigned to users, groups or - * service principals. + * the type of the service principal */ - appRoles?: AppRole[]; + servicePrincipalType?: string; /** - * @member {string[]} [servicePrincipalNames] A collection of service - * principal names. + * Optional list of tags that you can apply to your service principals. Not nullable. */ - servicePrincipalNames?: string[]; + tags?: string[]; } /** - * @interface - * An interface representing PasswordProfile. * The password profile associated with a user. - * */ export interface PasswordProfile { /** - * @member {string} password Password + * Password */ password: string; /** - * @member {boolean} [forceChangePasswordNextLogin] Whether to force a - * password change on next login. + * Whether to force a password change on next login. */ forceChangePasswordNextLogin?: boolean; /** - * @property Describes unknown properties. The value of an unknown property - * can be of "any" type. + * Describes unknown properties. The value of an unknown property can be of "any" type. */ [property: string]: any; } /** - * @interface * An interface representing UserBase. */ export interface UserBase { /** - * @member {string} [immutableId] This must be specified if you are using a - * federated domain for the user's userPrincipalName (UPN) property when - * creating a new user account. It is used to associate an on-premises Active + * This must be specified if you are using a federated domain for the user's userPrincipalName + * (UPN) property when creating a new user account. It is used to associate an on-premises Active * Directory user account with their Azure AD user object. */ immutableId?: string; /** - * @member {string} [usageLocation] A two letter country code (ISO standard - * 3166). Required for users that will be assigned licenses due to legal - * requirement to check for availability of services in countries. Examples + * A two letter country code (ISO standard 3166). Required for users that will be assigned + * licenses due to legal requirement to check for availability of services in countries. Examples * include: "US", "JP", and "GB". */ usageLocation?: string; /** - * @member {string} [givenName] The given name for the user. + * The given name for the user. */ givenName?: string; /** - * @member {string} [surname] The user's surname (family name or last name). + * The user's surname (family name or last name). */ surname?: string; /** - * @member {UserType} [userType] A string value that can be used to classify - * user types in your directory, such as 'Member' and 'Guest'. Possible - * values include: 'Member', 'Guest' + * A string value that can be used to classify user types in your directory, such as 'Member' and + * 'Guest'. Possible values include: 'Member', 'Guest' */ userType?: UserType; /** - * @property Describes unknown properties. The value of an unknown property - * can be of "any" type. + * Describes unknown properties. The value of an unknown property can be of "any" type. */ [property: string]: any; } /** - * @interface - * An interface representing UserCreateParameters. * Request parameters for creating a new work or school account user. - * - * @extends UserBase */ export interface UserCreateParameters extends UserBase { /** - * @member {boolean} accountEnabled Whether the account is enabled. + * Whether the account is enabled. */ accountEnabled: boolean; /** - * @member {string} displayName The display name of the user. + * The display name of the user. */ displayName: string; /** - * @member {PasswordProfile} passwordProfile Password Profile + * Password Profile */ passwordProfile: PasswordProfile; /** - * @member {string} userPrincipalName The user principal name - * (someuser@contoso.com). It must contain one of the verified domains for - * the tenant. + * The user principal name (someuser@contoso.com). It must contain one of the verified domains + * for the tenant. */ userPrincipalName: string; /** - * @member {string} mailNickname The mail alias for the user. + * The mail alias for the user. */ mailNickname: string; /** - * @member {string} [mail] The primary email address of the user. + * The primary email address of the user. */ mail?: string; } /** - * @interface - * An interface representing UserUpdateParameters. * Request parameters for updating an existing work or school account user. - * - * @extends UserBase */ export interface UserUpdateParameters extends UserBase { /** - * @member {boolean} [accountEnabled] Whether the account is enabled. + * Whether the account is enabled. */ accountEnabled?: boolean; /** - * @member {string} [displayName] The display name of the user. + * The display name of the user. */ displayName?: string; /** - * @member {PasswordProfile} [passwordProfile] The password profile of the - * user. + * The password profile of the user. */ passwordProfile?: PasswordProfile; /** - * @member {string} [userPrincipalName] The user principal name - * (someuser@contoso.com). It must contain one of the verified domains for - * the tenant. + * The user principal name (someuser@contoso.com). It must contain one of the verified domains + * for the tenant. */ userPrincipalName?: string; /** - * @member {string} [mailNickname] The mail alias for the user. + * The mail alias for the user. */ mailNickname?: string; } /** - * @interface - * An interface representing SignInName. - * Contains information about a sign-in name of a local account user in an - * Azure Active Directory B2C tenant. - * + * Contains information about a sign-in name of a local account user in an Azure Active Directory + * B2C tenant. */ export interface SignInName { /** - * @member {string} [type] A string value that can be used to classify user - * sign-in types in your directory, such as 'emailAddress' or 'userName'. + * A string value that can be used to classify user sign-in types in your directory, such as + * 'emailAddress' or 'userName'. */ type?: string; /** - * @member {string} [value] The sign-in used by the local account. Must be - * unique across the company/tenant. For example, 'johnc@example.com'. + * The sign-in used by the local account. Must be unique across the company/tenant. For example, + * 'johnc@example.com'. */ value?: string; /** - * @property Describes unknown properties. The value of an unknown property - * can be of "any" type. + * Describes unknown properties. The value of an unknown property can be of "any" type. */ [property: string]: any; } /** - * @interface - * An interface representing User. * Active Directory user information. - * */ export interface User { /** - * @member {string} objectType Polymorphic Discriminator + * Polymorphic Discriminator */ objectType: "User"; /** - * @member {string} [objectId] The object ID. - * **NOTE: This property will not be serialized. It can only be populated by - * the server.** + * The object ID. + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ readonly objectId?: string; /** - * @member {Date} [deletionTimestamp] The time at which the directory object - * was deleted. - * **NOTE: This property will not be serialized. It can only be populated by - * the server.** + * The time at which the directory object was deleted. + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ readonly deletionTimestamp?: Date; /** - * @member {string} [immutableId] This must be specified if you are using a - * federated domain for the user's userPrincipalName (UPN) property when - * creating a new user account. It is used to associate an on-premises Active + * This must be specified if you are using a federated domain for the user's userPrincipalName + * (UPN) property when creating a new user account. It is used to associate an on-premises Active * Directory user account with their Azure AD user object. */ immutableId?: string; /** - * @member {string} [usageLocation] A two letter country code (ISO standard - * 3166). Required for users that will be assigned licenses due to legal - * requirement to check for availability of services in countries. Examples + * A two letter country code (ISO standard 3166). Required for users that will be assigned + * licenses due to legal requirement to check for availability of services in countries. Examples * include: "US", "JP", and "GB". */ usageLocation?: string; /** - * @member {string} [givenName] The given name for the user. + * The given name for the user. */ givenName?: string; /** - * @member {string} [surname] The user's surname (family name or last name). + * The user's surname (family name or last name). */ surname?: string; /** - * @member {UserType} [userType] A string value that can be used to classify - * user types in your directory, such as 'Member' and 'Guest'. Possible - * values include: 'Member', 'Guest' + * A string value that can be used to classify user types in your directory, such as 'Member' and + * 'Guest'. Possible values include: 'Member', 'Guest' */ userType?: UserType; /** - * @member {boolean} [accountEnabled] Whether the account is enabled. + * Whether the account is enabled. */ accountEnabled?: boolean; /** - * @member {string} [displayName] The display name of the user. + * The display name of the user. */ displayName?: string; /** - * @member {string} [userPrincipalName] The principal name of the user. + * The principal name of the user. */ userPrincipalName?: string; /** - * @member {string} [mailNickname] The mail alias for the user. + * The mail alias for the user. */ mailNickname?: string; /** - * @member {string} [mail] The primary email address of the user. + * The primary email address of the user. */ mail?: string; /** - * @member {SignInName[]} [signInNames] The sign-in names of the user. + * The sign-in names of the user. */ signInNames?: SignInName[]; } /** - * @interface - * An interface representing UserGetMemberGroupsParameters. * Request parameters for GetMemberGroups API call. - * */ export interface UserGetMemberGroupsParameters { /** - * @member {boolean} securityEnabledOnly If true, only membership in - * security-enabled groups should be checked. Otherwise, membership in all - * groups should be checked. + * If true, only membership in security-enabled groups should be checked. Otherwise, membership + * in all groups should be checked. */ securityEnabledOnly: boolean; /** - * @property Describes unknown properties. The value of an unknown property - * can be of "any" type. + * Describes unknown properties. The value of an unknown property can be of "any" type. */ [property: string]: any; } /** - * @interface - * An interface representing GetObjectsParameters. * Request parameters for the GetObjectsByObjectIds API. - * */ export interface GetObjectsParameters { /** - * @member {string[]} [objectIds] The requested object IDs. + * The requested object IDs. */ objectIds?: string[]; /** - * @member {string[]} [types] The requested object types. + * The requested object types. */ types?: string[]; /** - * @member {boolean} [includeDirectoryObjectReferences] If true, also - * searches for object IDs in the partner tenant. + * If true, also searches for object IDs in the partner tenant. */ includeDirectoryObjectReferences?: boolean; /** - * @property Describes unknown properties. The value of an unknown property - * can be of "any" type. + * Describes unknown properties. The value of an unknown property can be of "any" type. */ [property: string]: any; } /** - * @interface - * An interface representing Domain. * Active Directory Domain information. - * */ export interface Domain { /** - * @member {string} [authenticationType] the type of the authentication into - * the domain. - * **NOTE: This property will not be serialized. It can only be populated by - * the server.** + * the type of the authentication into the domain. + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ readonly authenticationType?: string; /** - * @member {boolean} [isDefault] if this is the default domain in the tenant. - * **NOTE: This property will not be serialized. It can only be populated by - * the server.** + * if this is the default domain in the tenant. + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ readonly isDefault?: boolean; /** - * @member {boolean} [isVerified] if this domain's ownership is verified. - * **NOTE: This property will not be serialized. It can only be populated by - * the server.** + * if this domain's ownership is verified. + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ readonly isVerified?: boolean; /** - * @member {string} name the domain name. + * the domain name. */ name: string; /** - * @property Describes unknown properties. The value of an unknown property - * can be of "any" type. + * Describes unknown properties. The value of an unknown property can be of "any" type. */ [property: string]: any; } /** - * @interface - * An interface representing Permissions. + * An interface representing OAuth2PermissionGrant. */ -export interface Permissions { +export interface OAuth2PermissionGrant { /** - * @member {string} [odatatype] * Microsoft.DirectoryServices.OAuth2PermissionGrant */ odatatype?: string; /** - * @member {string} [clientId] The objectId of the Service Principal - * associated with the app + * The id of the resource's service principal granted consent to impersonate the user when + * accessing the resource (represented by the resourceId property). */ clientId?: string; /** - * @member {string} [consentType] Typically set to AllPrincipals + * The id of the permission grant + */ + objectId?: string; + /** + * Indicates if consent was provided by the administrator (on behalf of the organization) or by + * an individual. Possible values include: 'AllPrincipals', 'Principal' */ - consentType?: string; + consentType?: ConsentType; /** - * @member {any} [principalId] Set to null if AllPrincipals is set + * When consent type is Principal, this property specifies the id of the user that granted + * consent and applies only for that user. */ - principalId?: any; + principalId?: string; /** - * @member {string} [resourceId] Service Principal Id of the resource you - * want to grant + * Object Id of the resource you want to grant */ resourceId?: string; /** - * @member {string} [scope] Typically set to user_impersonation + * Specifies the value of the scope claim that the resource application should expect in the + * OAuth 2.0 access token. For example, User.Read */ scope?: string; /** - * @member {string} [startTime] Start time for TTL + * Start time for TTL */ startTime?: string; /** - * @member {string} [expiryTime] Expiry time for TTL + * Expiry time for TTL */ expiryTime?: string; } /** - * @interface - * An interface representing ApplicationsListOptionalParams. * Optional Parameters. - * - * @extends RequestOptionsBase */ export interface ApplicationsListOptionalParams extends msRest.RequestOptionsBase { /** - * @member {string} [filter] The filters to apply to the operation. + * The filters to apply to the operation. */ filter?: string; } /** - * @interface - * An interface representing DeletedApplicationsListOptionalParams. * Optional Parameters. - * - * @extends RequestOptionsBase */ export interface DeletedApplicationsListOptionalParams extends msRest.RequestOptionsBase { /** - * @member {string} [filter] The filter to apply to the operation. + * The filter to apply to the operation. */ filter?: string; } /** - * @interface - * An interface representing GroupsListOptionalParams. * Optional Parameters. - * - * @extends RequestOptionsBase */ export interface GroupsListOptionalParams extends msRest.RequestOptionsBase { /** - * @member {string} [filter] The filter to apply to the operation. + * The filter to apply to the operation. */ filter?: string; } /** - * @interface - * An interface representing ServicePrincipalsListOptionalParams. * Optional Parameters. - * - * @extends RequestOptionsBase */ export interface ServicePrincipalsListOptionalParams extends msRest.RequestOptionsBase { /** - * @member {string} [filter] The filter to apply to the operation. + * The filter to apply to the operation. */ filter?: string; } /** - * @interface - * An interface representing UsersListOptionalParams. * Optional Parameters. - * - * @extends RequestOptionsBase */ export interface UsersListOptionalParams extends msRest.RequestOptionsBase { /** - * @member {string} [filter] The filter to apply to the operation. + * The filter to apply to the operation. */ filter?: string; } /** - * @interface - * An interface representing DomainsListOptionalParams. * Optional Parameters. - * - * @extends RequestOptionsBase */ export interface DomainsListOptionalParams extends msRest.RequestOptionsBase { /** - * @member {string} [filter] The filter to apply to the operation. + * The filter to apply to the operation. */ filter?: string; } /** - * @interface - * An interface representing OAuth2GetOptionalParams. * Optional Parameters. - * - * @extends RequestOptionsBase */ -export interface OAuth2GetOptionalParams extends msRest.RequestOptionsBase { +export interface OAuth2PermissionGrantListOptionalParams extends msRest.RequestOptionsBase { /** - * @member {string} [filter] This is the Service Principal ObjectId - * associated with the app + * This is the Service Principal ObjectId associated with the app */ filter?: string; } /** - * @interface - * An interface representing OAuth2GrantOptionalParams. * Optional Parameters. - * - * @extends RequestOptionsBase */ -export interface OAuth2GrantOptionalParams extends msRest.RequestOptionsBase { +export interface OAuth2PermissionGrantCreateOptionalParams extends msRest.RequestOptionsBase { /** - * @member {Permissions} [body] The relevant app Service Principal Object Id - * and the Service Principal Objecit Id you want to grant. + * The relevant app Service Principal Object Id and the Service Principal Object Id you want to + * grant. */ - body?: Permissions; + body?: OAuth2PermissionGrant; } /** - * @interface * An interface representing GraphRbacManagementClientOptions. - * @extends AzureServiceClientOptions */ export interface GraphRbacManagementClientOptions extends AzureServiceClientOptions { - /** - * @member {string} [baseUri] - */ baseUri?: string; } - /** * @interface - * An interface representing the DirectoryObjectListResult. * DirectoryObject list operation result. - * * @extends Array */ export interface DirectoryObjectListResult extends Array { /** - * @member {string} [odatanextLink] The URL to get the next set of results. + * The URL to get the next set of results. */ odatanextLink?: string; } /** * @interface - * An interface representing the ApplicationListResult. * Application list operation result. - * * @extends Array */ export interface ApplicationListResult extends Array { /** - * @member {string} [odatanextLink] The URL to get the next set of results. + * The URL to get the next set of results. */ odatanextLink?: string; } /** * @interface - * An interface representing the KeyCredentialListResult. * KeyCredential list operation result. - * * @extends Array */ export interface KeyCredentialListResult extends Array { @@ -1370,9 +1448,7 @@ export interface KeyCredentialListResult extends Array { /** * @interface - * An interface representing the PasswordCredentialListResult. * PasswordCredential list operation result. - * * @extends Array */ export interface PasswordCredentialListResult extends Array { @@ -1380,23 +1456,19 @@ export interface PasswordCredentialListResult extends Array /** * @interface - * An interface representing the GroupListResult. * Server response for Get tenant groups API call - * * @extends Array */ export interface GroupListResult extends Array { /** - * @member {string} [odatanextLink] The URL to get the next set of results. + * The URL to get the next set of results. */ odatanextLink?: string; } /** * @interface - * An interface representing the GroupGetMemberGroupsResult. * Server response for GetMemberGroups API call. - * * @extends Array */ export interface GroupGetMemberGroupsResult extends Array { @@ -1404,37 +1476,31 @@ export interface GroupGetMemberGroupsResult extends Array { /** * @interface - * An interface representing the ServicePrincipalListResult. * Server response for get tenant service principals API call. - * * @extends Array */ export interface ServicePrincipalListResult extends Array { /** - * @member {string} [odatanextLink] the URL to get the next set of results. + * the URL to get the next set of results. */ odatanextLink?: string; } /** * @interface - * An interface representing the UserListResult. * Server response for Get tenant users API call. - * * @extends Array */ export interface UserListResult extends Array { /** - * @member {string} [odatanextLink] The URL to get the next set of results. + * The URL to get the next set of results. */ odatanextLink?: string; } /** * @interface - * An interface representing the UserGetMemberGroupsResult. * Server response for GetMemberGroups API call. - * * @extends Array */ export interface UserGetMemberGroupsResult extends Array { @@ -1442,14 +1508,24 @@ export interface UserGetMemberGroupsResult extends Array { /** * @interface - * An interface representing the DomainListResult. * Server response for Get tenant domains API call. - * * @extends Array */ export interface DomainListResult extends Array { } +/** + * @interface + * Server response for get oauth2 permissions grants + * @extends Array + */ +export interface OAuth2PermissionGrantListResult extends Array { + /** + * the URL to get the next set of results. + */ + odatanextLink?: string; +} + /** * Defines values for UserType. * Possible values include: 'Member', 'Guest' @@ -1458,6 +1534,14 @@ export interface DomainListResult extends Array { */ export type UserType = 'Member' | 'Guest'; +/** + * Defines values for ConsentType. + * Possible values include: 'AllPrincipals', 'Principal' + * @readonly + * @enum {string} + */ +export type ConsentType = 'AllPrincipals' | 'Principal'; + /** * Contains response data for the get operation. */ @@ -1470,6 +1554,7 @@ export type SignedInUserGetResponse = User & { * The response body as text (string format) */ bodyAsText: string; + /** * The response body as parsed JSON or XML */ @@ -1489,6 +1574,7 @@ export type SignedInUserListOwnedObjectsResponse = DirectoryObjectListResult & { * The response body as text (string format) */ bodyAsText: string; + /** * The response body as parsed JSON or XML */ @@ -1508,6 +1594,7 @@ export type SignedInUserListOwnedObjectsNextResponse = DirectoryObjectListResult * The response body as text (string format) */ bodyAsText: string; + /** * The response body as parsed JSON or XML */ @@ -1527,6 +1614,7 @@ export type ApplicationsCreateResponse = Application & { * The response body as text (string format) */ bodyAsText: string; + /** * The response body as parsed JSON or XML */ @@ -1546,6 +1634,7 @@ export type ApplicationsListResponse = ApplicationListResult & { * The response body as text (string format) */ bodyAsText: string; + /** * The response body as parsed JSON or XML */ @@ -1565,6 +1654,7 @@ export type ApplicationsGetResponse = Application & { * The response body as text (string format) */ bodyAsText: string; + /** * The response body as parsed JSON or XML */ @@ -1584,6 +1674,7 @@ export type ApplicationsListOwnersResponse = DirectoryObjectListResult & { * The response body as text (string format) */ bodyAsText: string; + /** * The response body as parsed JSON or XML */ @@ -1603,6 +1694,7 @@ export type ApplicationsListKeyCredentialsResponse = KeyCredentialListResult & { * The response body as text (string format) */ bodyAsText: string; + /** * The response body as parsed JSON or XML */ @@ -1622,6 +1714,7 @@ export type ApplicationsListPasswordCredentialsResponse = PasswordCredentialList * The response body as text (string format) */ bodyAsText: string; + /** * The response body as parsed JSON or XML */ @@ -1629,6 +1722,26 @@ export type ApplicationsListPasswordCredentialsResponse = PasswordCredentialList }; }; +/** + * Contains response data for the getServicePrincipalsIdByAppId operation. + */ +export type ApplicationsGetServicePrincipalsIdByAppIdResponse = ServicePrincipalObjectResult & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + + /** + * The response body as parsed JSON or XML + */ + parsedBody: ServicePrincipalObjectResult; + }; +}; + /** * Contains response data for the listNext operation. */ @@ -1641,6 +1754,7 @@ export type ApplicationsListNextResponse = ApplicationListResult & { * The response body as text (string format) */ bodyAsText: string; + /** * The response body as parsed JSON or XML */ @@ -1660,6 +1774,7 @@ export type ApplicationsListOwnersNextResponse = DirectoryObjectListResult & { * The response body as text (string format) */ bodyAsText: string; + /** * The response body as parsed JSON or XML */ @@ -1679,6 +1794,7 @@ export type DeletedApplicationsRestoreResponse = Application & { * The response body as text (string format) */ bodyAsText: string; + /** * The response body as parsed JSON or XML */ @@ -1698,6 +1814,7 @@ export type DeletedApplicationsListResponse = ApplicationListResult & { * The response body as text (string format) */ bodyAsText: string; + /** * The response body as parsed JSON or XML */ @@ -1717,6 +1834,7 @@ export type DeletedApplicationsListNextResponse = ApplicationListResult & { * The response body as text (string format) */ bodyAsText: string; + /** * The response body as parsed JSON or XML */ @@ -1736,6 +1854,7 @@ export type GroupsIsMemberOfResponse = CheckGroupMembershipResult & { * The response body as text (string format) */ bodyAsText: string; + /** * The response body as parsed JSON or XML */ @@ -1755,6 +1874,7 @@ export type GroupsCreateResponse = ADGroup & { * The response body as text (string format) */ bodyAsText: string; + /** * The response body as parsed JSON or XML */ @@ -1774,6 +1894,7 @@ export type GroupsListResponse = GroupListResult & { * The response body as text (string format) */ bodyAsText: string; + /** * The response body as parsed JSON or XML */ @@ -1793,6 +1914,7 @@ export type GroupsGetGroupMembersResponse = DirectoryObjectListResult & { * The response body as text (string format) */ bodyAsText: string; + /** * The response body as parsed JSON or XML */ @@ -1812,6 +1934,7 @@ export type GroupsGetResponse = ADGroup & { * The response body as text (string format) */ bodyAsText: string; + /** * The response body as parsed JSON or XML */ @@ -1831,6 +1954,7 @@ export type GroupsGetMemberGroupsResponse = GroupGetMemberGroupsResult & { * The response body as text (string format) */ bodyAsText: string; + /** * The response body as parsed JSON or XML */ @@ -1850,6 +1974,7 @@ export type GroupsListOwnersResponse = DirectoryObjectListResult & { * The response body as text (string format) */ bodyAsText: string; + /** * The response body as parsed JSON or XML */ @@ -1869,6 +1994,7 @@ export type GroupsListNextResponse = GroupListResult & { * The response body as text (string format) */ bodyAsText: string; + /** * The response body as parsed JSON or XML */ @@ -1888,6 +2014,7 @@ export type GroupsGetGroupMembersNextResponse = DirectoryObjectListResult & { * The response body as text (string format) */ bodyAsText: string; + /** * The response body as parsed JSON or XML */ @@ -1907,6 +2034,7 @@ export type GroupsListOwnersNextResponse = DirectoryObjectListResult & { * The response body as text (string format) */ bodyAsText: string; + /** * The response body as parsed JSON or XML */ @@ -1926,6 +2054,7 @@ export type ServicePrincipalsCreateResponse = ServicePrincipal & { * The response body as text (string format) */ bodyAsText: string; + /** * The response body as parsed JSON or XML */ @@ -1945,6 +2074,7 @@ export type ServicePrincipalsListResponse = ServicePrincipalListResult & { * The response body as text (string format) */ bodyAsText: string; + /** * The response body as parsed JSON or XML */ @@ -1964,6 +2094,7 @@ export type ServicePrincipalsGetResponse = ServicePrincipal & { * The response body as text (string format) */ bodyAsText: string; + /** * The response body as parsed JSON or XML */ @@ -1983,6 +2114,7 @@ export type ServicePrincipalsListOwnersResponse = DirectoryObjectListResult & { * The response body as text (string format) */ bodyAsText: string; + /** * The response body as parsed JSON or XML */ @@ -2002,6 +2134,7 @@ export type ServicePrincipalsListKeyCredentialsResponse = KeyCredentialListResul * The response body as text (string format) */ bodyAsText: string; + /** * The response body as parsed JSON or XML */ @@ -2021,6 +2154,7 @@ export type ServicePrincipalsListPasswordCredentialsResponse = PasswordCredentia * The response body as text (string format) */ bodyAsText: string; + /** * The response body as parsed JSON or XML */ @@ -2040,6 +2174,7 @@ export type ServicePrincipalsListNextResponse = ServicePrincipalListResult & { * The response body as text (string format) */ bodyAsText: string; + /** * The response body as parsed JSON or XML */ @@ -2059,6 +2194,7 @@ export type ServicePrincipalsListOwnersNextResponse = DirectoryObjectListResult * The response body as text (string format) */ bodyAsText: string; + /** * The response body as parsed JSON or XML */ @@ -2078,6 +2214,7 @@ export type UsersCreateResponse = User & { * The response body as text (string format) */ bodyAsText: string; + /** * The response body as parsed JSON or XML */ @@ -2097,6 +2234,7 @@ export type UsersListResponse = UserListResult & { * The response body as text (string format) */ bodyAsText: string; + /** * The response body as parsed JSON or XML */ @@ -2116,6 +2254,7 @@ export type UsersGetResponse = User & { * The response body as text (string format) */ bodyAsText: string; + /** * The response body as parsed JSON or XML */ @@ -2135,6 +2274,7 @@ export type UsersGetMemberGroupsResponse = UserGetMemberGroupsResult & { * The response body as text (string format) */ bodyAsText: string; + /** * The response body as parsed JSON or XML */ @@ -2154,6 +2294,7 @@ export type UsersListNextResponse = UserListResult & { * The response body as text (string format) */ bodyAsText: string; + /** * The response body as parsed JSON or XML */ @@ -2173,6 +2314,7 @@ export type ObjectsGetObjectsByObjectIdsResponse = DirectoryObjectListResult & { * The response body as text (string format) */ bodyAsText: string; + /** * The response body as parsed JSON or XML */ @@ -2192,6 +2334,7 @@ export type ObjectsGetObjectsByObjectIdsNextResponse = DirectoryObjectListResult * The response body as text (string format) */ bodyAsText: string; + /** * The response body as parsed JSON or XML */ @@ -2211,6 +2354,7 @@ export type DomainsListResponse = DomainListResult & { * The response body as text (string format) */ bodyAsText: string; + /** * The response body as parsed JSON or XML */ @@ -2230,6 +2374,7 @@ export type DomainsGetResponse = Domain & { * The response body as text (string format) */ bodyAsText: string; + /** * The response body as parsed JSON or XML */ @@ -2238,9 +2383,29 @@ export type DomainsGetResponse = Domain & { }; /** - * Contains response data for the get operation. + * Contains response data for the list operation. + */ +export type OAuth2PermissionGrantListResponse = OAuth2PermissionGrantListResult & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + + /** + * The response body as parsed JSON or XML + */ + parsedBody: OAuth2PermissionGrantListResult; + }; +}; + +/** + * Contains response data for the create operation. */ -export type OAuth2GetResponse = Permissions & { +export type OAuth2PermissionGrantCreateResponse = OAuth2PermissionGrant & { /** * The underlying HTTP response. */ @@ -2249,17 +2414,18 @@ export type OAuth2GetResponse = Permissions & { * The response body as text (string format) */ bodyAsText: string; + /** * The response body as parsed JSON or XML */ - parsedBody: Permissions; + parsedBody: OAuth2PermissionGrant; }; }; /** - * Contains response data for the grant operation. + * Contains response data for the listNext operation. */ -export type OAuth2GrantResponse = Permissions & { +export type OAuth2PermissionGrantListNextResponse = OAuth2PermissionGrantListResult & { /** * The underlying HTTP response. */ @@ -2268,9 +2434,10 @@ export type OAuth2GrantResponse = Permissions & { * The response body as text (string format) */ bodyAsText: string; + /** * The response body as parsed JSON or XML */ - parsedBody: Permissions; + parsedBody: OAuth2PermissionGrantListResult; }; }; diff --git a/sdk/graphrbac/graph/src/models/mappers.ts b/sdk/graphrbac/graph/src/models/mappers.ts index 7022f2da87d4..1eda38d650ec 100644 --- a/sdk/graphrbac/graph/src/models/mappers.ts +++ b/sdk/graphrbac/graph/src/models/mappers.ts @@ -1,11 +1,9 @@ /* * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. + * Licensed under the MIT License. See License.txt in the project root for license information. * * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is - * regenerated. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. */ import { CloudErrorMapper, BaseResourceMapper } from "@azure/ms-rest-azure-js"; @@ -14,6 +12,266 @@ import * as msRest from "@azure/ms-rest-js"; export const CloudError = CloudErrorMapper; export const BaseResource = BaseResourceMapper; +export const InformationalUrl: msRest.CompositeMapper = { + serializedName: "InformationalUrl", + type: { + name: "Composite", + className: "InformationalUrl", + modelProperties: { + termsOfService: { + serializedName: "termsOfService", + type: { + name: "String" + } + }, + marketing: { + serializedName: "marketing", + type: { + name: "String" + } + }, + privacy: { + serializedName: "privacy", + type: { + name: "String" + } + }, + support: { + serializedName: "support", + type: { + name: "String" + } + } + } + } +}; + +export const OAuth2Permission: msRest.CompositeMapper = { + serializedName: "OAuth2Permission", + type: { + name: "Composite", + className: "OAuth2Permission", + modelProperties: { + adminConsentDescription: { + serializedName: "adminConsentDescription", + type: { + name: "String" + } + }, + adminConsentDisplayName: { + serializedName: "adminConsentDisplayName", + type: { + name: "String" + } + }, + id: { + serializedName: "id", + type: { + name: "String" + } + }, + isEnabled: { + serializedName: "isEnabled", + type: { + name: "Boolean" + } + }, + type: { + serializedName: "type", + type: { + name: "String" + } + }, + userConsentDescription: { + serializedName: "userConsentDescription", + type: { + name: "String" + } + }, + userConsentDisplayName: { + serializedName: "userConsentDisplayName", + type: { + name: "String" + } + }, + value: { + serializedName: "value", + type: { + name: "String" + } + } + } + } +}; + +export const OptionalClaim: msRest.CompositeMapper = { + serializedName: "OptionalClaim", + type: { + name: "Composite", + className: "OptionalClaim", + modelProperties: { + name: { + serializedName: "name", + type: { + name: "String" + } + }, + source: { + serializedName: "source", + type: { + name: "String" + } + }, + essential: { + serializedName: "essential", + type: { + name: "Boolean" + } + }, + additionalProperties: { + serializedName: "additionalProperties", + type: { + name: "Object" + } + } + } + } +}; + +export const OptionalClaims: msRest.CompositeMapper = { + serializedName: "OptionalClaims", + type: { + name: "Composite", + className: "OptionalClaims", + modelProperties: { + idToken: { + serializedName: "idToken", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "OptionalClaim" + } + } + } + }, + accessToken: { + serializedName: "accessToken", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "OptionalClaim" + } + } + } + }, + samlToken: { + serializedName: "samlToken", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "OptionalClaim" + } + } + } + } + } + } +}; + +export const PreAuthorizedApplicationPermission: msRest.CompositeMapper = { + serializedName: "PreAuthorizedApplicationPermission", + type: { + name: "Composite", + className: "PreAuthorizedApplicationPermission", + modelProperties: { + directAccessGrant: { + serializedName: "directAccessGrant", + type: { + name: "Boolean" + } + }, + accessGrants: { + serializedName: "accessGrants", + type: { + name: "Sequence", + element: { + type: { + name: "String" + } + } + } + } + } + } +}; + +export const PreAuthorizedApplicationExtension: msRest.CompositeMapper = { + serializedName: "PreAuthorizedApplicationExtension", + type: { + name: "Composite", + className: "PreAuthorizedApplicationExtension", + modelProperties: { + conditions: { + serializedName: "conditions", + type: { + name: "Sequence", + element: { + type: { + name: "String" + } + } + } + } + } + } +}; + +export const PreAuthorizedApplication: msRest.CompositeMapper = { + serializedName: "PreAuthorizedApplication", + type: { + name: "Composite", + className: "PreAuthorizedApplication", + modelProperties: { + appId: { + serializedName: "appId", + type: { + name: "String" + } + }, + permissions: { + serializedName: "permissions", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "PreAuthorizedApplicationPermission" + } + } + } + }, + extensions: { + serializedName: "extensions", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "PreAuthorizedApplicationExtension" + } + } + } + } + } + } +}; + export const GraphError: msRest.CompositeMapper = { serializedName: "GraphError", type: { @@ -122,7 +380,7 @@ export const KeyCredential: msRest.CompositeMapper = { customKeyIdentifier: { serializedName: "customKeyIdentifier", type: { - name: "ByteArray" + name: "String" } } }, @@ -163,6 +421,12 @@ export const PasswordCredential: msRest.CompositeMapper = { type: { name: "String" } + }, + customKeyIdentifier: { + serializedName: "customKeyIdentifier", + type: { + name: "ByteArray" + } } }, additionalProperties: { @@ -291,12 +555,30 @@ export const AppRole: msRest.CompositeMapper = { } }; -export const ApplicationCreateParameters: msRest.CompositeMapper = { - serializedName: "ApplicationCreateParameters", +export const ApplicationBase: msRest.CompositeMapper = { + serializedName: "ApplicationBase", type: { name: "Composite", - className: "ApplicationCreateParameters", + className: "ApplicationBase", modelProperties: { + allowGuestsSignIn: { + serializedName: "allowGuestsSignIn", + type: { + name: "Boolean" + } + }, + allowPassthroughUsers: { + serializedName: "allowPassthroughUsers", + type: { + name: "Boolean" + } + }, + appLogoUrl: { + serializedName: "appLogoUrl", + type: { + name: "String" + } + }, appRoles: { serializedName: "appRoles", type: { @@ -309,47 +591,52 @@ export const ApplicationCreateParameters: msRest.CompositeMapper = { } } }, + appPermissions: { + serializedName: "appPermissions", + type: { + name: "Sequence", + element: { + type: { + name: "String" + } + } + } + }, availableToOtherTenants: { - required: true, serializedName: "availableToOtherTenants", type: { name: "Boolean" } }, - displayName: { - required: true, - serializedName: "displayName", + errorUrl: { + serializedName: "errorUrl", type: { name: "String" } }, + groupMembershipClaims: { + serializedName: "groupMembershipClaims", + type: { + name: "Object" + } + }, homepage: { serializedName: "homepage", type: { name: "String" } }, - identifierUris: { - required: true, - serializedName: "identifierUris", + informationalUrls: { + serializedName: "informationalUrls", type: { - name: "Sequence", - element: { - type: { - name: "String" - } - } + name: "Composite", + className: "InformationalUrl" } }, - replyUrls: { - serializedName: "replyUrls", + isDeviceOnlyAuthSupported: { + serializedName: "isDeviceOnlyAuthSupported", type: { - name: "Sequence", - element: { - type: { - name: "String" - } - } + name: "Boolean" } }, keyCredentials: { @@ -369,6 +656,71 @@ export const ApplicationCreateParameters: msRest.CompositeMapper = { } } }, + knownClientApplications: { + serializedName: "knownClientApplications", + type: { + name: "Sequence", + element: { + type: { + name: "String" + } + } + } + }, + logoutUrl: { + serializedName: "logoutUrl", + type: { + name: "String" + } + }, + oauth2AllowImplicitFlow: { + serializedName: "oauth2AllowImplicitFlow", + type: { + name: "Boolean" + } + }, + oauth2AllowUrlPathMatching: { + serializedName: "oauth2AllowUrlPathMatching", + type: { + name: "Boolean" + } + }, + oauth2Permissions: { + serializedName: "oauth2Permissions", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "OAuth2Permission" + } + } + } + }, + oauth2RequirePostResponse: { + serializedName: "oauth2RequirePostResponse", + type: { + name: "Boolean" + } + }, + orgRestrictions: { + serializedName: "orgRestrictions", + type: { + name: "Sequence", + element: { + type: { + name: "String" + } + } + } + }, + optionalClaims: { + serializedName: "optionalClaims", + type: { + name: "Composite", + className: "OptionalClaims" + } + }, passwordCredentials: { serializedName: "passwordCredentials", type: { @@ -386,12 +738,41 @@ export const ApplicationCreateParameters: msRest.CompositeMapper = { } } }, - oauth2AllowImplicitFlow: { - serializedName: "oauth2AllowImplicitFlow", + preAuthorizedApplications: { + serializedName: "preAuthorizedApplications", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "PreAuthorizedApplication" + } + } + } + }, + publicClient: { + serializedName: "publicClient", type: { name: "Boolean" } }, + publisherDomain: { + serializedName: "publisherDomain", + type: { + name: "String" + } + }, + replyUrls: { + serializedName: "replyUrls", + type: { + name: "Sequence", + element: { + type: { + name: "String" + } + } + } + }, requiredResourceAccess: { serializedName: "requiredResourceAccess", type: { @@ -408,11 +789,53 @@ export const ApplicationCreateParameters: msRest.CompositeMapper = { } } } + }, + samlMetadataUrl: { + serializedName: "samlMetadataUrl", + type: { + name: "String" + } + }, + signInAudience: { + serializedName: "signInAudience", + type: { + name: "String" + } + }, + wwwHomepage: { + serializedName: "wwwHomepage", + type: { + name: "String" + } } - }, - additionalProperties: { - type: { - name: "Object" + } + } +}; + +export const ApplicationCreateParameters: msRest.CompositeMapper = { + serializedName: "ApplicationCreateParameters", + type: { + name: "Composite", + className: "ApplicationCreateParameters", + modelProperties: { + ...ApplicationBase.type.modelProperties, + displayName: { + required: true, + serializedName: "displayName", + type: { + name: "String" + } + }, + identifierUris: { + serializedName: "identifierUris", + type: { + name: "Sequence", + element: { + type: { + name: "String" + } + } + } } } } @@ -424,6 +847,61 @@ export const ApplicationUpdateParameters: msRest.CompositeMapper = { name: "Composite", className: "ApplicationUpdateParameters", modelProperties: { + ...ApplicationBase.type.modelProperties, + displayName: { + serializedName: "displayName", + type: { + name: "String" + } + }, + identifierUris: { + serializedName: "identifierUris", + type: { + name: "Sequence", + element: { + type: { + name: "String" + } + } + } + } + } + } +}; + +export const Application: msRest.CompositeMapper = { + serializedName: "Application", + type: { + name: "Composite", + polymorphicDiscriminator: DirectoryObject.type.polymorphicDiscriminator, + uberParent: "DirectoryObject", + className: "Application", + modelProperties: { + ...DirectoryObject.type.modelProperties, + appId: { + serializedName: "appId", + type: { + name: "String" + } + }, + allowGuestsSignIn: { + serializedName: "allowGuestsSignIn", + type: { + name: "Boolean" + } + }, + allowPassthroughUsers: { + serializedName: "allowPassthroughUsers", + type: { + name: "Boolean" + } + }, + appLogoUrl: { + serializedName: "appLogoUrl", + type: { + name: "String" + } + }, appRoles: { serializedName: "appRoles", type: { @@ -436,6 +914,17 @@ export const ApplicationUpdateParameters: msRest.CompositeMapper = { } } }, + appPermissions: { + serializedName: "appPermissions", + type: { + name: "Sequence", + element: { + type: { + name: "String" + } + } + } + }, availableToOtherTenants: { serializedName: "availableToOtherTenants", type: { @@ -448,6 +937,18 @@ export const ApplicationUpdateParameters: msRest.CompositeMapper = { name: "String" } }, + errorUrl: { + serializedName: "errorUrl", + type: { + name: "String" + } + }, + groupMembershipClaims: { + serializedName: "groupMembershipClaims", + type: { + name: "Object" + } + }, homepage: { serializedName: "homepage", type: { @@ -465,15 +966,17 @@ export const ApplicationUpdateParameters: msRest.CompositeMapper = { } } }, - replyUrls: { - serializedName: "replyUrls", + informationalUrls: { + serializedName: "informationalUrls", type: { - name: "Sequence", - element: { - type: { - name: "String" - } - } + name: "Composite", + className: "InformationalUrl" + } + }, + isDeviceOnlyAuthSupported: { + serializedName: "isDeviceOnlyAuthSupported", + type: { + name: "Boolean" } }, keyCredentials: { @@ -493,107 +996,114 @@ export const ApplicationUpdateParameters: msRest.CompositeMapper = { } } }, - passwordCredentials: { - serializedName: "passwordCredentials", + knownClientApplications: { + serializedName: "knownClientApplications", type: { name: "Sequence", element: { type: { - name: "Composite", - className: "PasswordCredential", - additionalProperties: { - type: { - name: "Object" - } - } + name: "String" } } } }, + logoutUrl: { + serializedName: "logoutUrl", + type: { + name: "String" + } + }, oauth2AllowImplicitFlow: { serializedName: "oauth2AllowImplicitFlow", type: { name: "Boolean" } }, - requiredResourceAccess: { - serializedName: "requiredResourceAccess", + oauth2AllowUrlPathMatching: { + serializedName: "oauth2AllowUrlPathMatching", + type: { + name: "Boolean" + } + }, + oauth2Permissions: { + serializedName: "oauth2Permissions", type: { name: "Sequence", element: { type: { name: "Composite", - className: "RequiredResourceAccess", - additionalProperties: { - type: { - name: "Object" - } - } + className: "OAuth2Permission" } } } - } - }, - additionalProperties: { - type: { - name: "Object" - } - } - } -}; - -export const Application: msRest.CompositeMapper = { - serializedName: "Application", - type: { - name: "Composite", - polymorphicDiscriminator: DirectoryObject.type.polymorphicDiscriminator, - uberParent: "DirectoryObject", - className: "Application", - modelProperties: { - ...DirectoryObject.type.modelProperties, - appId: { - serializedName: "appId", + }, + oauth2RequirePostResponse: { + serializedName: "oauth2RequirePostResponse", type: { - name: "String" + name: "Boolean" } }, - appRoles: { - serializedName: "appRoles", + orgRestrictions: { + serializedName: "orgRestrictions", + type: { + name: "Sequence", + element: { + type: { + name: "String" + } + } + } + }, + optionalClaims: { + serializedName: "optionalClaims", + type: { + name: "Composite", + className: "OptionalClaims" + } + }, + passwordCredentials: { + serializedName: "passwordCredentials", type: { name: "Sequence", element: { type: { name: "Composite", - className: "AppRole" + className: "PasswordCredential", + additionalProperties: { + type: { + name: "Object" + } + } } } } }, - appPermissions: { - serializedName: "appPermissions", + preAuthorizedApplications: { + serializedName: "preAuthorizedApplications", type: { name: "Sequence", element: { type: { - name: "String" + name: "Composite", + className: "PreAuthorizedApplication" } } } }, - availableToOtherTenants: { - serializedName: "availableToOtherTenants", + publicClient: { + serializedName: "publicClient", type: { name: "Boolean" } }, - displayName: { - serializedName: "displayName", + publisherDomain: { + serializedName: "publisherDomain", type: { name: "String" } }, - identifierUris: { - serializedName: "identifierUris", + replyUrls: { + serializedName: "replyUrls", type: { name: "Sequence", element: { @@ -603,48 +1113,65 @@ export const Application: msRest.CompositeMapper = { } } }, - replyUrls: { - serializedName: "replyUrls", + requiredResourceAccess: { + serializedName: "requiredResourceAccess", type: { name: "Sequence", element: { type: { - name: "String" + name: "Composite", + className: "RequiredResourceAccess", + additionalProperties: { + type: { + name: "Object" + } + } } } } }, - homepage: { - serializedName: "homepage", + samlMetadataUrl: { + serializedName: "samlMetadataUrl", + type: { + name: "String" + } + }, + signInAudience: { + serializedName: "signInAudience", + type: { + name: "String" + } + }, + wwwHomepage: { + serializedName: "wwwHomepage", + type: { + name: "String" + } + } + }, + additionalProperties: DirectoryObject.type.additionalProperties + } +}; + +export const ServicePrincipalObjectResult: msRest.CompositeMapper = { + serializedName: "ServicePrincipalObjectResult", + type: { + name: "Composite", + className: "ServicePrincipalObjectResult", + modelProperties: { + value: { + serializedName: "value", type: { name: "String" } }, - oauth2AllowImplicitFlow: { - serializedName: "oauth2AllowImplicitFlow", - type: { - name: "Boolean" - } - }, - requiredResourceAccess: { - serializedName: "requiredResourceAccess", + odatametadata: { + serializedName: "odata\\.metadata", type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "RequiredResourceAccess", - additionalProperties: { - type: { - name: "Object" - } - } - } - } + name: "String" } } - }, - additionalProperties: DirectoryObject.type.additionalProperties + } } }; @@ -911,11 +1438,11 @@ export const CheckGroupMembershipResult: msRest.CompositeMapper = { } }; -export const ServicePrincipalCreateParameters: msRest.CompositeMapper = { - serializedName: "ServicePrincipalCreateParameters", +export const ServicePrincipalBase: msRest.CompositeMapper = { + serializedName: "ServicePrincipalBase", type: { name: "Composite", - className: "ServicePrincipalCreateParameters", + className: "ServicePrincipalBase", modelProperties: { accountEnabled: { serializedName: "accountEnabled", @@ -923,37 +1450,12 @@ export const ServicePrincipalCreateParameters: msRest.CompositeMapper = { name: "Boolean" } }, - appId: { - required: true, - serializedName: "appId", - type: { - name: "String" - } - }, appRoleAssignmentRequired: { serializedName: "appRoleAssignmentRequired", type: { name: "Boolean" } }, - displayName: { - serializedName: "displayName", - type: { - name: "String" - } - }, - errorUrl: { - serializedName: "errorUrl", - type: { - name: "String" - } - }, - homepage: { - serializedName: "homepage", - type: { - name: "String" - } - }, keyCredentials: { serializedName: "keyCredentials", type: { @@ -988,40 +1490,12 @@ export const ServicePrincipalCreateParameters: msRest.CompositeMapper = { } } }, - publisherName: { - serializedName: "publisherName", - type: { - name: "String" - } - }, - replyUrls: { - serializedName: "replyUrls", - type: { - name: "Sequence", - element: { - type: { - name: "String" - } - } - } - }, - samlMetadataUrl: { - serializedName: "samlMetadataUrl", + servicePrincipalType: { + serializedName: "servicePrincipalType", type: { name: "String" } }, - servicePrincipalNames: { - serializedName: "servicePrincipalNames", - type: { - name: "Sequence", - element: { - type: { - name: "String" - } - } - } - }, tags: { serializedName: "tags", type: { @@ -1033,10 +1507,23 @@ export const ServicePrincipalCreateParameters: msRest.CompositeMapper = { } } } - }, - additionalProperties: { - type: { - name: "Object" + } + } +}; + +export const ServicePrincipalCreateParameters: msRest.CompositeMapper = { + serializedName: "ServicePrincipalCreateParameters", + type: { + name: "Composite", + className: "ServicePrincipalCreateParameters", + modelProperties: { + ...ServicePrincipalBase.type.modelProperties, + appId: { + required: true, + serializedName: "appId", + type: { + name: "String" + } } } } @@ -1048,24 +1535,75 @@ export const ServicePrincipalUpdateParameters: msRest.CompositeMapper = { name: "Composite", className: "ServicePrincipalUpdateParameters", modelProperties: { + ...ServicePrincipalBase.type.modelProperties + } + } +}; + +export const ServicePrincipal: msRest.CompositeMapper = { + serializedName: "ServicePrincipal", + type: { + name: "Composite", + polymorphicDiscriminator: DirectoryObject.type.polymorphicDiscriminator, + uberParent: "DirectoryObject", + className: "ServicePrincipal", + modelProperties: { + ...DirectoryObject.type.modelProperties, accountEnabled: { serializedName: "accountEnabled", type: { name: "Boolean" } }, + alternativeNames: { + serializedName: "alternativeNames", + type: { + name: "Sequence", + element: { + type: { + name: "String" + } + } + } + }, + appDisplayName: { + readOnly: true, + serializedName: "appDisplayName", + type: { + name: "String" + } + }, appId: { serializedName: "appId", type: { name: "String" } }, + appOwnerTenantId: { + readOnly: true, + serializedName: "appOwnerTenantId", + type: { + name: "String" + } + }, appRoleAssignmentRequired: { serializedName: "appRoleAssignmentRequired", type: { name: "Boolean" } }, + appRoles: { + serializedName: "appRoles", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "AppRole" + } + } + } + }, displayName: { serializedName: "displayName", type: { @@ -1101,6 +1639,25 @@ export const ServicePrincipalUpdateParameters: msRest.CompositeMapper = { } } }, + logoutUrl: { + serializedName: "logoutUrl", + type: { + name: "String" + } + }, + oauth2Permissions: { + readOnly: true, + serializedName: "oauth2Permissions", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "OAuth2Permission" + } + } + } + }, passwordCredentials: { serializedName: "passwordCredentials", type: { @@ -1118,6 +1675,12 @@ export const ServicePrincipalUpdateParameters: msRest.CompositeMapper = { } } }, + preferredTokenSigningKeyThumbprint: { + serializedName: "preferredTokenSigningKeyThumbprint", + type: { + name: "String" + } + }, publisherName: { serializedName: "publisherName", type: { @@ -1152,61 +1715,14 @@ export const ServicePrincipalUpdateParameters: msRest.CompositeMapper = { } } }, - tags: { - serializedName: "tags", - type: { - name: "Sequence", - element: { - type: { - name: "String" - } - } - } - } - }, - additionalProperties: { - type: { - name: "Object" - } - } - } -}; - -export const ServicePrincipal: msRest.CompositeMapper = { - serializedName: "ServicePrincipal", - type: { - name: "Composite", - polymorphicDiscriminator: DirectoryObject.type.polymorphicDiscriminator, - uberParent: "DirectoryObject", - className: "ServicePrincipal", - modelProperties: { - ...DirectoryObject.type.modelProperties, - displayName: { - serializedName: "displayName", - type: { - name: "String" - } - }, - appId: { - serializedName: "appId", + servicePrincipalType: { + serializedName: "servicePrincipalType", type: { name: "String" } }, - appRoles: { - serializedName: "appRoles", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "AppRole" - } - } - } - }, - servicePrincipalNames: { - serializedName: "servicePrincipalNames", + tags: { + serializedName: "tags", type: { name: "Sequence", element: { @@ -1627,11 +2143,11 @@ export const Domain: msRest.CompositeMapper = { } }; -export const Permissions: msRest.CompositeMapper = { - serializedName: "Permissions", +export const OAuth2PermissionGrant: msRest.CompositeMapper = { + serializedName: "OAuth2PermissionGrant", type: { name: "Composite", - className: "Permissions", + className: "OAuth2PermissionGrant", modelProperties: { odatatype: { serializedName: "odata\\.type", @@ -1645,6 +2161,12 @@ export const Permissions: msRest.CompositeMapper = { name: "String" } }, + objectId: { + serializedName: "objectId", + type: { + name: "String" + } + }, consentType: { serializedName: "consentType", type: { @@ -1654,7 +2176,7 @@ export const Permissions: msRest.CompositeMapper = { principalId: { serializedName: "principalId", type: { - name: "Object" + name: "String" } }, resourceId: { @@ -1957,10 +2479,39 @@ export const DomainListResult: msRest.CompositeMapper = { } }; +export const OAuth2PermissionGrantListResult: msRest.CompositeMapper = { + serializedName: "OAuth2PermissionGrantListResult", + type: { + name: "Composite", + className: "OAuth2PermissionGrantListResult", + modelProperties: { + value: { + serializedName: "", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "OAuth2PermissionGrant" + } + } + } + }, + odatanextLink: { + serializedName: "odata\\.nextLink", + type: { + name: "String" + } + } + } + } +}; + export const discriminators = { 'DirectoryObject' : DirectoryObject, 'DirectoryObject.Application' : Application, 'DirectoryObject.Group' : ADGroup, 'DirectoryObject.ServicePrincipal' : ServicePrincipal, 'DirectoryObject.User' : User + }; diff --git a/sdk/graphrbac/graph/src/models/oAuth2PermissionGrantOperationsMappers.ts b/sdk/graphrbac/graph/src/models/oAuth2PermissionGrantOperationsMappers.ts new file mode 100644 index 000000000000..5561dd9807c8 --- /dev/null +++ b/sdk/graphrbac/graph/src/models/oAuth2PermissionGrantOperationsMappers.ts @@ -0,0 +1,15 @@ +/* + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +export { + discriminators, + CloudError, + GraphError, + OAuth2PermissionGrant, + OAuth2PermissionGrantListResult +} from "../models/mappers"; diff --git a/sdk/graphrbac/graph/src/models/objectsMappers.ts b/sdk/graphrbac/graph/src/models/objectsMappers.ts index 48ec347b8ac6..4519f8519587 100644 --- a/sdk/graphrbac/graph/src/models/objectsMappers.ts +++ b/sdk/graphrbac/graph/src/models/objectsMappers.ts @@ -1,26 +1,32 @@ /* * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. + * Licensed under the MIT License. See License.txt in the project root for license information. * * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is - * regenerated. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. */ export { discriminators, - GetObjectsParameters, - DirectoryObjectListResult, - DirectoryObject, - CloudError, + ADGroup, Application, AppRole, + CloudError, + DirectoryObject, + DirectoryObjectListResult, + GetObjectsParameters, + InformationalUrl, + KeyCredential, + OAuth2Permission, + OptionalClaim, + OptionalClaims, + PasswordCredential, + PreAuthorizedApplication, + PreAuthorizedApplicationExtension, + PreAuthorizedApplicationPermission, RequiredResourceAccess, ResourceAccess, - ADGroup, ServicePrincipal, - User, - SignInName + SignInName, + User } from "../models/mappers"; - diff --git a/sdk/graphrbac/graph/src/models/parameters.ts b/sdk/graphrbac/graph/src/models/parameters.ts index 57d946162f5d..b770a204656e 100644 --- a/sdk/graphrbac/graph/src/models/parameters.ts +++ b/sdk/graphrbac/graph/src/models/parameters.ts @@ -30,6 +30,16 @@ export const apiVersion: msRest.OperationQueryParameter = { } } }; +export const applicationID: msRest.OperationURLParameter = { + parameterPath: "applicationID", + mapper: { + required: true, + serializedName: "applicationID", + type: { + name: "String" + } + } +}; export const applicationObjectId: msRest.OperationURLParameter = { parameterPath: "applicationObjectId", mapper: { diff --git a/sdk/graphrbac/graph/src/models/servicePrincipalsMappers.ts b/sdk/graphrbac/graph/src/models/servicePrincipalsMappers.ts index 8d81554f24cd..a271c68a12cd 100644 --- a/sdk/graphrbac/graph/src/models/servicePrincipalsMappers.ts +++ b/sdk/graphrbac/graph/src/models/servicePrincipalsMappers.ts @@ -1,34 +1,39 @@ /* * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. + * Licensed under the MIT License. See License.txt in the project root for license information. * * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is - * regenerated. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. */ export { discriminators, - ServicePrincipalCreateParameters, - KeyCredential, - PasswordCredential, - ServicePrincipal, - DirectoryObject, + ADGroup, + Application, AppRole, - GraphError, - ServicePrincipalListResult, - ServicePrincipalUpdateParameters, + DirectoryObject, DirectoryObjectListResult, + GraphError, + InformationalUrl, + KeyCredential, KeyCredentialListResult, KeyCredentialsUpdateParameters, + OAuth2Permission, + OptionalClaim, + OptionalClaims, + PasswordCredential, PasswordCredentialListResult, PasswordCredentialsUpdateParameters, - Application, + PreAuthorizedApplication, + PreAuthorizedApplicationExtension, + PreAuthorizedApplicationPermission, RequiredResourceAccess, ResourceAccess, - ADGroup, - User, - SignInName + ServicePrincipal, + ServicePrincipalBase, + ServicePrincipalCreateParameters, + ServicePrincipalListResult, + ServicePrincipalUpdateParameters, + SignInName, + User } from "../models/mappers"; - diff --git a/sdk/graphrbac/graph/src/models/signedInUserMappers.ts b/sdk/graphrbac/graph/src/models/signedInUserMappers.ts index 8b06f0505013..37f16626e22d 100644 --- a/sdk/graphrbac/graph/src/models/signedInUserMappers.ts +++ b/sdk/graphrbac/graph/src/models/signedInUserMappers.ts @@ -1,25 +1,31 @@ /* * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. + * Licensed under the MIT License. See License.txt in the project root for license information. * * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is - * regenerated. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. */ export { discriminators, - User, - DirectoryObject, - SignInName, - GraphError, - DirectoryObjectListResult, + ADGroup, Application, AppRole, + DirectoryObject, + DirectoryObjectListResult, + GraphError, + InformationalUrl, + KeyCredential, + OAuth2Permission, + OptionalClaim, + OptionalClaims, + PasswordCredential, + PreAuthorizedApplication, + PreAuthorizedApplicationExtension, + PreAuthorizedApplicationPermission, RequiredResourceAccess, ResourceAccess, - ADGroup, - ServicePrincipal + ServicePrincipal, + SignInName, + User } from "../models/mappers"; - diff --git a/sdk/graphrbac/graph/src/models/usersMappers.ts b/sdk/graphrbac/graph/src/models/usersMappers.ts index b5a83a95b4c9..bc1577f6adcf 100644 --- a/sdk/graphrbac/graph/src/models/usersMappers.ts +++ b/sdk/graphrbac/graph/src/models/usersMappers.ts @@ -1,31 +1,37 @@ /* * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. + * Licensed under the MIT License. See License.txt in the project root for license information. * * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is - * regenerated. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. */ export { discriminators, - UserCreateParameters, - UserBase, - PasswordProfile, - User, - DirectoryObject, - SignInName, - GraphError, - UserListResult, - UserUpdateParameters, - UserGetMemberGroupsParameters, - UserGetMemberGroupsResult, + ADGroup, Application, AppRole, + DirectoryObject, + GraphError, + InformationalUrl, + KeyCredential, + OAuth2Permission, + OptionalClaim, + OptionalClaims, + PasswordCredential, + PasswordProfile, + PreAuthorizedApplication, + PreAuthorizedApplicationExtension, + PreAuthorizedApplicationPermission, RequiredResourceAccess, ResourceAccess, - ADGroup, - ServicePrincipal + ServicePrincipal, + SignInName, + User, + UserBase, + UserCreateParameters, + UserGetMemberGroupsParameters, + UserGetMemberGroupsResult, + UserListResult, + UserUpdateParameters } from "../models/mappers"; - diff --git a/sdk/graphrbac/graph/src/operations/applications.ts b/sdk/graphrbac/graph/src/operations/applications.ts index 1f9021edd05a..164dc84f32c0 100644 --- a/sdk/graphrbac/graph/src/operations/applications.ts +++ b/sdk/graphrbac/graph/src/operations/applications.ts @@ -382,6 +382,34 @@ export class Applications { callback); } + /** + * Gets an object id for a given application id from the current tenant. + * @param applicationID The application ID. + * @param [options] The optional parameters + * @returns Promise + */ + getServicePrincipalsIdByAppId(applicationID: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param applicationID The application ID. + * @param callback The callback + */ + getServicePrincipalsIdByAppId(applicationID: string, callback: msRest.ServiceCallback): void; + /** + * @param applicationID The application ID. + * @param options The optional parameters + * @param callback The callback + */ + getServicePrincipalsIdByAppId(applicationID: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + getServicePrincipalsIdByAppId(applicationID: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + applicationID, + options + }, + getServicePrincipalsIdByAppIdOperationSpec, + callback) as Promise; + } + /** * Gets a list of applications from the current tenant. * @param nextLink Next link for the list operation. @@ -757,6 +785,30 @@ const updatePasswordCredentialsOperationSpec: msRest.OperationSpec = { serializer }; +const getServicePrincipalsIdByAppIdOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + path: "{tenantID}/servicePrincipalsByAppId/{applicationID}/objectId", + urlParameters: [ + Parameters.tenantID, + Parameters.applicationID + ], + queryParameters: [ + Parameters.apiVersion + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.ServicePrincipalObjectResult + }, + default: { + bodyMapper: Mappers.GraphError + } + }, + serializer +}; + const listNextOperationSpec: msRest.OperationSpec = { httpMethod: "GET", path: "{tenantID}/{nextLink}", diff --git a/sdk/graphrbac/graph/src/operations/index.ts b/sdk/graphrbac/graph/src/operations/index.ts index eb96cda32036..b53368ac7e91 100644 --- a/sdk/graphrbac/graph/src/operations/index.ts +++ b/sdk/graphrbac/graph/src/operations/index.ts @@ -16,4 +16,4 @@ export * from "./servicePrincipals"; export * from "./users"; export * from "./objects"; export * from "./domains"; -export * from "./oAuth2"; +export * from "./oAuth2PermissionGrantOperations"; diff --git a/sdk/graphrbac/graph/src/operations/oAuth2PermissionGrantOperations.ts b/sdk/graphrbac/graph/src/operations/oAuth2PermissionGrantOperations.ts new file mode 100644 index 000000000000..7bddae67b60e --- /dev/null +++ b/sdk/graphrbac/graph/src/operations/oAuth2PermissionGrantOperations.ts @@ -0,0 +1,234 @@ +/* + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is + * regenerated. + */ + +import * as msRest from "@azure/ms-rest-js"; +import * as Models from "../models"; +import * as Mappers from "../models/oAuth2PermissionGrantOperationsMappers"; +import * as Parameters from "../models/parameters"; +import { GraphRbacManagementClientContext } from "../graphRbacManagementClientContext"; + +/** Class representing a OAuth2PermissionGrantOperations. */ +export class OAuth2PermissionGrantOperations { + private readonly client: GraphRbacManagementClientContext; + + /** + * Create a OAuth2PermissionGrantOperations. + * @param {GraphRbacManagementClientContext} client Reference to the service client. + */ + constructor(client: GraphRbacManagementClientContext) { + this.client = client; + } + + /** + * Queries OAuth2 permissions grants for the relevant SP ObjectId of an app. + * @param [options] The optional parameters + * @returns Promise + */ + list(options?: Models.OAuth2PermissionGrantListOptionalParams): Promise; + /** + * @param callback The callback + */ + list(callback: msRest.ServiceCallback): void; + /** + * @param options The optional parameters + * @param callback The callback + */ + list(options: Models.OAuth2PermissionGrantListOptionalParams, callback: msRest.ServiceCallback): void; + list(options?: Models.OAuth2PermissionGrantListOptionalParams | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + options + }, + listOperationSpec, + callback) as Promise; + } + + /** + * Grants OAuth2 permissions for the relevant resource Ids of an app. + * @param [options] The optional parameters + * @returns Promise + */ + create(options?: Models.OAuth2PermissionGrantCreateOptionalParams): Promise; + /** + * @param callback The callback + */ + create(callback: msRest.ServiceCallback): void; + /** + * @param options The optional parameters + * @param callback The callback + */ + create(options: Models.OAuth2PermissionGrantCreateOptionalParams, callback: msRest.ServiceCallback): void; + create(options?: Models.OAuth2PermissionGrantCreateOptionalParams | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + options + }, + createOperationSpec, + callback) as Promise; + } + + /** + * Delete a OAuth2 permission grant for the relevant resource Ids of an app. + * @param objectId The object ID of a permission grant. + * @param [options] The optional parameters + * @returns Promise + */ + deleteMethod(objectId: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param objectId The object ID of a permission grant. + * @param callback The callback + */ + deleteMethod(objectId: string, callback: msRest.ServiceCallback): void; + /** + * @param objectId The object ID of a permission grant. + * @param options The optional parameters + * @param callback The callback + */ + deleteMethod(objectId: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + deleteMethod(objectId: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + objectId, + options + }, + deleteMethodOperationSpec, + callback); + } + + /** + * Gets the next page of OAuth2 permission grants + * @param nextLink Next link for the list operation. + * @param [options] The optional parameters + * @returns Promise + */ + listNext(nextLink: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param nextLink Next link for the list operation. + * @param callback The callback + */ + listNext(nextLink: string, callback: msRest.ServiceCallback): void; + /** + * @param nextLink Next link for the list operation. + * @param options The optional parameters + * @param callback The callback + */ + listNext(nextLink: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + listNext(nextLink: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + nextLink, + options + }, + listNextOperationSpec, + callback) as Promise; + } +} + +// Operation Specifications +const serializer = new msRest.Serializer(Mappers); +const listOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + path: "{tenantID}/oauth2PermissionGrants", + urlParameters: [ + Parameters.tenantID + ], + queryParameters: [ + Parameters.filter, + Parameters.apiVersion + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.OAuth2PermissionGrantListResult + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; + +const createOperationSpec: msRest.OperationSpec = { + httpMethod: "POST", + path: "{tenantID}/oauth2PermissionGrants", + urlParameters: [ + Parameters.tenantID + ], + queryParameters: [ + Parameters.apiVersion + ], + headerParameters: [ + Parameters.acceptLanguage + ], + requestBody: { + parameterPath: [ + "options", + "body" + ], + mapper: Mappers.OAuth2PermissionGrant + }, + responses: { + 201: { + bodyMapper: Mappers.OAuth2PermissionGrant + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; + +const deleteMethodOperationSpec: msRest.OperationSpec = { + httpMethod: "DELETE", + path: "{tenantID}/oauth2PermissionGrants/{objectId}", + urlParameters: [ + Parameters.objectId, + Parameters.tenantID + ], + queryParameters: [ + Parameters.apiVersion + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 204: {}, + default: { + bodyMapper: Mappers.GraphError + } + }, + serializer +}; + +const listNextOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + path: "{tenantID}/{nextLink}", + urlParameters: [ + Parameters.nextLink, + Parameters.tenantID + ], + queryParameters: [ + Parameters.apiVersion + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.OAuth2PermissionGrantListResult + }, + default: { + bodyMapper: Mappers.GraphError + } + }, + serializer +};