diff --git a/lib/services/graphManagement/LICENSE.txt b/lib/services/graphManagement/LICENSE.txt index 5431ba98b9..8f3d856145 100644 --- a/lib/services/graphManagement/LICENSE.txt +++ b/lib/services/graphManagement/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/lib/services/graphManagement/lib/models/aDGroup.js b/lib/services/graphManagement/lib/models/aDGroup.js index cf18d4c62a..4b860380aa 100644 --- a/lib/services/graphManagement/lib/models/aDGroup.js +++ b/lib/services/graphManagement/lib/models/aDGroup.js @@ -20,13 +20,14 @@ const models = require('./index'); class ADGroup extends models['DirectoryObject'] { /** * Create a ADGroup. - * @member {string} [displayName] The display name of the group. - * @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. - * @member {string} [mailNickname] The mail alias for the group. - * @member {boolean} [securityEnabled] Whether the group is security-enable. - * @member {string} [mail] The primary email address of the group. + * @property {string} [displayName] The display name of the group. + * @property {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. + * @property {string} [mailNickname] The mail alias for the group. + * @property {boolean} [securityEnabled] Whether the group is + * security-enable. + * @property {string} [mail] The primary email address of the group. */ constructor() { super(); diff --git a/lib/services/graphManagement/lib/models/addOwnerParameters.js b/lib/services/graphManagement/lib/models/addOwnerParameters.js index 58e49cb1d4..5a82a7a606 100644 --- a/lib/services/graphManagement/lib/models/addOwnerParameters.js +++ b/lib/services/graphManagement/lib/models/addOwnerParameters.js @@ -17,7 +17,7 @@ class AddOwnerParameters { /** * Create a AddOwnerParameters. - * @member {string} url A owner object URL, such as + * @property {string} url 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, diff --git a/lib/services/graphManagement/lib/models/appRole.js b/lib/services/graphManagement/lib/models/appRole.js index c440fb20e3..73286258de 100644 --- a/lib/services/graphManagement/lib/models/appRole.js +++ b/lib/services/graphManagement/lib/models/appRole.js @@ -16,21 +16,21 @@ class AppRole { /** * Create a AppRole. - * @member {string} [id] Unique role identifier inside the appRoles + * @property {string} [id] Unique role identifier inside the appRoles * collection. - * @member {array} [allowedMemberTypes] Specifies whether this app role + * @property {array} [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 * scenarios) by setting to 'Application', or to both. - * @member {string} [description] Permission help text that appears in the + * @property {string} [description] Permission help text that appears in the * admin app assignment and consent experiences. - * @member {string} [displayName] Display name for the permission that + * @property {string} [displayName] Display name for the permission that * appears in the admin consent and app assignment experiences. - * @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. - * @member {string} [value] Specifies the value of the roles claim that the + * @property {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. + * @property {string} [value] Specifies the value of the roles claim that the * application should expect in the authentication and access tokens. */ constructor() { diff --git a/lib/services/graphManagement/lib/models/application.js b/lib/services/graphManagement/lib/models/application.js index cde51e7052..3ed6b54336 100644 --- a/lib/services/graphManagement/lib/models/application.js +++ b/lib/services/graphManagement/lib/models/application.js @@ -20,25 +20,87 @@ const models = require('./index'); class Application extends models['DirectoryObject'] { /** * Create a Application. - * @member {string} [appId] The application ID. - * @member {array} [appRoles] The collection of application roles that an + * @property {string} [appId] The application ID. + * @property {boolean} [allowGuestsSignIn] A property on the application to + * indicate if the application accepts other IDPs or not or partially + * accepts. + * @property {boolean} [allowPassthroughUsers] Indicates that the application + * supports pass through users who have no presence in the resource tenant. + * @property {string} [appLogoUrl] The url for the application logo image + * stored in a CDN. + * @property {array} [appRoles] The collection of application roles that an * application may declare. These roles can be assigned to users, groups or * service principals. - * @member {array} [appPermissions] The application permissions. - * @member {boolean} [availableToOtherTenants] Whether the application is be + * @property {array} [appPermissions] The application permissions. + * @property {boolean} [availableToOtherTenants] Whether the application is * available to other tenants. - * @member {string} [displayName] The display name of the application. - * @member {array} [identifierUris] A collection of URIs for the application. - * @member {array} [replyUrls] A collection of reply URLs for the + * @property {string} [displayName] The display name of the application. + * @property {string} [errorUrl] A URL provided by the author of the + * application to report errors when using the application. + * @property {string} [homepage] The home page of the application. + * @property {array} [identifierUris] A collection of URIs for the * application. - * @member {string} [homepage] The home page of the application. - * @member {boolean} [oauth2AllowImplicitFlow] Whether to allow implicit + * @property {object} [informationalUrls] urls with more informations of the + * application. + * @property {string} [informationalUrls.termsOfService] The terms of service + * URI + * @property {string} [informationalUrls.marketing] The marketing URI + * @property {string} [informationalUrls.privacy] The privacy policy URI + * @property {string} [informationalUrls.support] The support URI + * @property {boolean} [isDeviceOnlyAuthSupported] Specifies whether this + * application supports device authentication without a user. The default is + * false. + * @property {array} [keyCredentials] A collection of KeyCredential objects. + * @property {array} [knownClientApplications] 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). + * @property {string} [logoutUrl] the url of the logout page + * @property {boolean} [oauth2AllowImplicitFlow] Whether to allow implicit * grant flow for OAuth2 - * @member {array} [requiredResourceAccess] Specifies resources that this + * @property {boolean} [oauth2AllowUrlPathMatching] 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. + * @property {array} [oauth2Permissions] 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 {boolean} [oauth2RequirePostResponse] 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. + * @property {array} [orgRestrictions] A list of tenants allowed to access + * application. + * @property {object} [optionalClaims] + * @property {array} [optionalClaims.idToken] Optional claims requested to be + * included in the id token. + * @property {array} [optionalClaims.accessToken] Optional claims requested + * to be included in the access token. + * @property {array} [optionalClaims.samlToken] Optional claims requested to + * be included in the saml token. + * @property {array} [passwordCredentials] A collection of PasswordCredential + * objects + * @property {array} [preAuthorizedApplications] list of pre-authorizaed + * applications. + * @property {boolean} [publicClient] Specifies whether this application is a + * public client (such as an installed application running on a mobile + * device). Default is false. + * @property {string} [publisherDomain] Reliable domain which can be used to + * identify an application. + * @property {array} [replyUrls] A collection of reply URLs for the + * application. + * @property {array} [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. + * @property {string} [samlMetadataUrl] The URL to the SAML metadata for the + * application. + * @property {string} [signInAudience] Audience for signing in to the + * application (AzureADMyOrganizatio, AzureADAllorganizations, + * AzureADAndMicrosofAccounts). + * @property {string} [wwwHomepage] The primary Web page. */ constructor() { super(); @@ -94,6 +156,27 @@ class Application extends models['DirectoryObject'] { name: 'String' } }, + allowGuestsSignIn: { + required: false, + serializedName: 'allowGuestsSignIn', + type: { + name: 'Boolean' + } + }, + allowPassthroughUsers: { + required: false, + serializedName: 'allowPassthroughUsers', + type: { + name: 'Boolean' + } + }, + appLogoUrl: { + required: false, + serializedName: 'appLogoUrl', + type: { + name: 'String' + } + }, appRoles: { required: false, serializedName: 'appRoles', @@ -137,6 +220,20 @@ class Application extends models['DirectoryObject'] { name: 'String' } }, + errorUrl: { + required: false, + serializedName: 'errorUrl', + type: { + name: 'String' + } + }, + homepage: { + required: false, + serializedName: 'homepage', + type: { + name: 'String' + } + }, identifierUris: { required: false, serializedName: 'identifierUris', @@ -151,9 +248,51 @@ class Application extends models['DirectoryObject'] { } } }, - replyUrls: { + informationalUrls: { required: false, - serializedName: 'replyUrls', + serializedName: 'informationalUrls', + type: { + name: 'Composite', + className: 'InformationalUrl' + } + }, + isDeviceOnlyAuthSupported: { + required: false, + serializedName: 'isDeviceOnlyAuthSupported', + type: { + name: 'Boolean' + } + }, + keyCredentials: { + required: false, + serializedName: 'keyCredentials', + type: { + name: 'Sequence', + element: { + required: false, + serializedName: 'KeyCredentialElementType', + type: { + name: 'Composite', + additionalProperties: { + type: { + name: 'Dictionary', + value: { + required: false, + serializedName: 'ObjectElementType', + type: { + name: 'Object' + } + } + } + }, + className: 'KeyCredential' + } + } + } + }, + knownClientApplications: { + required: false, + serializedName: 'knownClientApplications', type: { name: 'Sequence', element: { @@ -165,9 +304,9 @@ class Application extends models['DirectoryObject'] { } } }, - homepage: { + logoutUrl: { required: false, - serializedName: 'homepage', + serializedName: 'logoutUrl', type: { name: 'String' } @@ -179,6 +318,127 @@ class Application extends models['DirectoryObject'] { name: 'Boolean' } }, + oauth2AllowUrlPathMatching: { + required: false, + serializedName: 'oauth2AllowUrlPathMatching', + type: { + name: 'Boolean' + } + }, + oauth2Permissions: { + required: false, + serializedName: 'oauth2Permissions', + type: { + name: 'Sequence', + element: { + required: false, + serializedName: 'OAuth2PermissionElementType', + type: { + name: 'Composite', + className: 'OAuth2Permission' + } + } + } + }, + oauth2RequirePostResponse: { + required: false, + serializedName: 'oauth2RequirePostResponse', + type: { + name: 'Boolean' + } + }, + orgRestrictions: { + required: false, + serializedName: 'orgRestrictions', + type: { + name: 'Sequence', + element: { + required: false, + serializedName: 'StringElementType', + type: { + name: 'String' + } + } + } + }, + optionalClaims: { + required: false, + serializedName: 'optionalClaims', + type: { + name: 'Composite', + className: 'OptionalClaims' + } + }, + passwordCredentials: { + required: false, + serializedName: 'passwordCredentials', + type: { + name: 'Sequence', + element: { + required: false, + serializedName: 'PasswordCredentialElementType', + type: { + name: 'Composite', + additionalProperties: { + type: { + name: 'Dictionary', + value: { + required: false, + serializedName: 'ObjectElementType', + type: { + name: 'Object' + } + } + } + }, + className: 'PasswordCredential' + } + } + } + }, + preAuthorizedApplications: { + required: false, + serializedName: 'preAuthorizedApplications', + type: { + name: 'Sequence', + element: { + required: false, + serializedName: 'PreAuthorizedApplicationElementType', + type: { + name: 'Composite', + className: 'PreAuthorizedApplication' + } + } + } + }, + publicClient: { + required: false, + serializedName: 'publicClient', + type: { + name: 'Boolean' + } + }, + publisherDomain: { + required: false, + serializedName: 'publisherDomain', + type: { + name: 'String' + } + }, + replyUrls: { + required: false, + serializedName: 'replyUrls', + type: { + name: 'Sequence', + element: { + required: false, + serializedName: 'StringElementType', + type: { + name: 'String' + } + } + } + }, requiredResourceAccess: { required: false, serializedName: 'requiredResourceAccess', @@ -205,6 +465,27 @@ class Application extends models['DirectoryObject'] { } } } + }, + samlMetadataUrl: { + required: false, + serializedName: 'samlMetadataUrl', + type: { + name: 'String' + } + }, + signInAudience: { + required: false, + serializedName: 'signInAudience', + type: { + name: 'String' + } + }, + wwwHomepage: { + required: false, + serializedName: 'wwwHomepage', + type: { + name: 'String' + } } } } diff --git a/lib/services/graphManagement/lib/models/applicationBase.js b/lib/services/graphManagement/lib/models/applicationBase.js new file mode 100644 index 0000000000..dee3120401 --- /dev/null +++ b/lib/services/graphManagement/lib/models/applicationBase.js @@ -0,0 +1,456 @@ +/* + * 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. + */ + +'use strict'; + +/** + * Active Directive Application common properties shared among GET, POST and + * PATCH + * + */ +class ApplicationBase { + /** + * Create a ApplicationBase. + * @property {boolean} [allowGuestsSignIn] A property on the application to + * indicate if the application accepts other IDPs or not or partially + * accepts. + * @property {boolean} [allowPassthroughUsers] Indicates that the application + * supports pass through users who have no presence in the resource tenant. + * @property {string} [appLogoUrl] The url for the application logo image + * stored in a CDN. + * @property {array} [appRoles] The collection of application roles that an + * application may declare. These roles can be assigned to users, groups or + * service principals. + * @property {array} [appPermissions] The application permissions. + * @property {boolean} [availableToOtherTenants] Whether the application is + * available to other tenants. + * @property {string} [displayName] The display name of the application. + * @property {string} [errorUrl] A URL provided by the author of the + * application to report errors when using the application. + * @property {string} [homepage] The home page of the application. + * @property {array} [identifierUris] A collection of URIs for the + * application. + * @property {object} [informationalUrls] urls with more informations of the + * application. + * @property {string} [informationalUrls.termsOfService] The terms of service + * URI + * @property {string} [informationalUrls.marketing] The marketing URI + * @property {string} [informationalUrls.privacy] The privacy policy URI + * @property {string} [informationalUrls.support] The support URI + * @property {boolean} [isDeviceOnlyAuthSupported] Specifies whether this + * application supports device authentication without a user. The default is + * false. + * @property {array} [keyCredentials] A collection of KeyCredential objects. + * @property {array} [knownClientApplications] 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). + * @property {string} [logoutUrl] the url of the logout page + * @property {boolean} [oauth2AllowImplicitFlow] Whether to allow implicit + * grant flow for OAuth2 + * @property {boolean} [oauth2AllowUrlPathMatching] 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. + * @property {array} [oauth2Permissions] 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 {boolean} [oauth2RequirePostResponse] 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. + * @property {array} [orgRestrictions] A list of tenants allowed to access + * application. + * @property {object} [optionalClaims] + * @property {array} [optionalClaims.idToken] Optional claims requested to be + * included in the id token. + * @property {array} [optionalClaims.accessToken] Optional claims requested + * to be included in the access token. + * @property {array} [optionalClaims.samlToken] Optional claims requested to + * be included in the saml token. + * @property {array} [passwordCredentials] A collection of PasswordCredential + * objects + * @property {array} [preAuthorizedApplications] list of pre-authorizaed + * applications. + * @property {boolean} [publicClient] Specifies whether this application is a + * public client (such as an installed application running on a mobile + * device). Default is false. + * @property {string} [publisherDomain] Reliable domain which can be used to + * identify an application. + * @property {array} [replyUrls] A collection of reply URLs for the + * application. + * @property {array} [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. + * @property {string} [samlMetadataUrl] The URL to the SAML metadata for the + * application. + * @property {string} [signInAudience] Audience for signing in to the + * application (AzureADMyOrganizatio, AzureADAllorganizations, + * AzureADAndMicrosofAccounts). + * @property {string} [wwwHomepage] The primary Web page. + */ + constructor() { + } + + /** + * Defines the metadata of ApplicationBase + * + * @returns {object} metadata of ApplicationBase + * + */ + mapper() { + return { + required: false, + serializedName: 'ApplicationBase', + type: { + name: 'Composite', + className: 'ApplicationBase', + modelProperties: { + allowGuestsSignIn: { + required: false, + serializedName: 'allowGuestsSignIn', + type: { + name: 'Boolean' + } + }, + allowPassthroughUsers: { + required: false, + serializedName: 'allowPassthroughUsers', + type: { + name: 'Boolean' + } + }, + appLogoUrl: { + required: false, + serializedName: 'appLogoUrl', + type: { + name: 'String' + } + }, + appRoles: { + required: false, + serializedName: 'appRoles', + type: { + name: 'Sequence', + element: { + required: false, + serializedName: 'AppRoleElementType', + type: { + name: 'Composite', + className: 'AppRole' + } + } + } + }, + appPermissions: { + required: false, + serializedName: 'appPermissions', + type: { + name: 'Sequence', + element: { + required: false, + serializedName: 'StringElementType', + type: { + name: 'String' + } + } + } + }, + availableToOtherTenants: { + required: false, + serializedName: 'availableToOtherTenants', + type: { + name: 'Boolean' + } + }, + displayName: { + required: false, + serializedName: 'displayName', + type: { + name: 'String' + } + }, + errorUrl: { + required: false, + serializedName: 'errorUrl', + type: { + name: 'String' + } + }, + homepage: { + required: false, + serializedName: 'homepage', + type: { + name: 'String' + } + }, + identifierUris: { + required: false, + serializedName: 'identifierUris', + type: { + name: 'Sequence', + element: { + required: false, + serializedName: 'StringElementType', + type: { + name: 'String' + } + } + } + }, + informationalUrls: { + required: false, + serializedName: 'informationalUrls', + type: { + name: 'Composite', + className: 'InformationalUrl' + } + }, + isDeviceOnlyAuthSupported: { + required: false, + serializedName: 'isDeviceOnlyAuthSupported', + type: { + name: 'Boolean' + } + }, + keyCredentials: { + required: false, + serializedName: 'keyCredentials', + type: { + name: 'Sequence', + element: { + required: false, + serializedName: 'KeyCredentialElementType', + type: { + name: 'Composite', + additionalProperties: { + type: { + name: 'Dictionary', + value: { + required: false, + serializedName: 'ObjectElementType', + type: { + name: 'Object' + } + } + } + }, + className: 'KeyCredential' + } + } + } + }, + knownClientApplications: { + required: false, + serializedName: 'knownClientApplications', + type: { + name: 'Sequence', + element: { + required: false, + serializedName: 'StringElementType', + type: { + name: 'String' + } + } + } + }, + logoutUrl: { + required: false, + serializedName: 'logoutUrl', + type: { + name: 'String' + } + }, + oauth2AllowImplicitFlow: { + required: false, + serializedName: 'oauth2AllowImplicitFlow', + type: { + name: 'Boolean' + } + }, + oauth2AllowUrlPathMatching: { + required: false, + serializedName: 'oauth2AllowUrlPathMatching', + type: { + name: 'Boolean' + } + }, + oauth2Permissions: { + required: false, + serializedName: 'oauth2Permissions', + type: { + name: 'Sequence', + element: { + required: false, + serializedName: 'OAuth2PermissionElementType', + type: { + name: 'Composite', + className: 'OAuth2Permission' + } + } + } + }, + oauth2RequirePostResponse: { + required: false, + serializedName: 'oauth2RequirePostResponse', + type: { + name: 'Boolean' + } + }, + orgRestrictions: { + required: false, + serializedName: 'orgRestrictions', + type: { + name: 'Sequence', + element: { + required: false, + serializedName: 'StringElementType', + type: { + name: 'String' + } + } + } + }, + optionalClaims: { + required: false, + serializedName: 'optionalClaims', + type: { + name: 'Composite', + className: 'OptionalClaims' + } + }, + passwordCredentials: { + required: false, + serializedName: 'passwordCredentials', + type: { + name: 'Sequence', + element: { + required: false, + serializedName: 'PasswordCredentialElementType', + type: { + name: 'Composite', + additionalProperties: { + type: { + name: 'Dictionary', + value: { + required: false, + serializedName: 'ObjectElementType', + type: { + name: 'Object' + } + } + } + }, + className: 'PasswordCredential' + } + } + } + }, + preAuthorizedApplications: { + required: false, + serializedName: 'preAuthorizedApplications', + type: { + name: 'Sequence', + element: { + required: false, + serializedName: 'PreAuthorizedApplicationElementType', + type: { + name: 'Composite', + className: 'PreAuthorizedApplication' + } + } + } + }, + publicClient: { + required: false, + serializedName: 'publicClient', + type: { + name: 'Boolean' + } + }, + publisherDomain: { + required: false, + serializedName: 'publisherDomain', + type: { + name: 'String' + } + }, + replyUrls: { + required: false, + serializedName: 'replyUrls', + type: { + name: 'Sequence', + element: { + required: false, + serializedName: 'StringElementType', + type: { + name: 'String' + } + } + } + }, + requiredResourceAccess: { + required: false, + serializedName: 'requiredResourceAccess', + type: { + name: 'Sequence', + element: { + required: false, + serializedName: 'RequiredResourceAccessElementType', + type: { + name: 'Composite', + additionalProperties: { + type: { + name: 'Dictionary', + value: { + required: false, + serializedName: 'ObjectElementType', + type: { + name: 'Object' + } + } + } + }, + className: 'RequiredResourceAccess' + } + } + } + }, + samlMetadataUrl: { + required: false, + serializedName: 'samlMetadataUrl', + type: { + name: 'String' + } + }, + signInAudience: { + required: false, + serializedName: 'signInAudience', + type: { + name: 'String' + } + }, + wwwHomepage: { + required: false, + serializedName: 'wwwHomepage', + type: { + name: 'String' + } + } + } + } + }; + } +} + +module.exports = ApplicationBase; diff --git a/lib/services/graphManagement/lib/models/applicationCreateParameters.js b/lib/services/graphManagement/lib/models/applicationCreateParameters.js index 9ad3b2398f..09ded0be39 100644 --- a/lib/services/graphManagement/lib/models/applicationCreateParameters.js +++ b/lib/services/graphManagement/lib/models/applicationCreateParameters.js @@ -10,35 +10,19 @@ 'use strict'; +const models = require('./index'); + /** * Request parameters for creating a new application. * + * @extends models['ApplicationBase'] */ -class ApplicationCreateParameters { +class ApplicationCreateParameters extends models['ApplicationBase'] { /** * Create a ApplicationCreateParameters. - * @member {array} [appRoles] The collection of application roles that an - * application may declare. These roles can be assigned to users, groups or - * service principals. - * @member {boolean} availableToOtherTenants Whether the application is - * available to other tenants. - * @member {string} displayName The display name of the application. - * @member {string} [homepage] The home page of the application. - * @member {array} identifierUris A collection of URIs for the application. - * @member {array} [replyUrls] A collection of reply URLs for the - * application. - * @member {array} [keyCredentials] The list of KeyCredential objects. - * @member {array} [passwordCredentials] The list of PasswordCredential - * objects. - * @member {boolean} [oauth2AllowImplicitFlow] Whether to allow implicit - * grant flow for OAuth2 - * @member {array} [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. */ constructor() { + super(); } /** @@ -53,20 +37,29 @@ class ApplicationCreateParameters { serializedName: 'ApplicationCreateParameters', type: { name: 'Composite', - additionalProperties: { - type: { - name: 'Dictionary', - value: { - required: false, - serializedName: 'ObjectElementType', - type: { - name: 'Object' - } - } - } - }, className: 'ApplicationCreateParameters', modelProperties: { + allowGuestsSignIn: { + required: false, + serializedName: 'allowGuestsSignIn', + type: { + name: 'Boolean' + } + }, + allowPassthroughUsers: { + required: false, + serializedName: 'allowPassthroughUsers', + type: { + name: 'Boolean' + } + }, + appLogoUrl: { + required: false, + serializedName: 'appLogoUrl', + type: { + name: 'String' + } + }, appRoles: { required: false, serializedName: 'appRoles', @@ -82,20 +75,41 @@ class ApplicationCreateParameters { } } }, + appPermissions: { + required: false, + serializedName: 'appPermissions', + type: { + name: 'Sequence', + element: { + required: false, + serializedName: 'StringElementType', + type: { + name: 'String' + } + } + } + }, availableToOtherTenants: { - required: true, + required: false, serializedName: 'availableToOtherTenants', type: { name: 'Boolean' } }, displayName: { - required: true, + required: false, serializedName: 'displayName', type: { name: 'String' } }, + errorUrl: { + required: false, + serializedName: 'errorUrl', + type: { + name: 'String' + } + }, homepage: { required: false, serializedName: 'homepage', @@ -104,7 +118,7 @@ class ApplicationCreateParameters { } }, identifierUris: { - required: true, + required: false, serializedName: 'identifierUris', type: { name: 'Sequence', @@ -117,18 +131,19 @@ class ApplicationCreateParameters { } } }, - replyUrls: { + informationalUrls: { required: false, - serializedName: 'replyUrls', + serializedName: 'informationalUrls', type: { - name: 'Sequence', - element: { - required: false, - serializedName: 'StringElementType', - type: { - name: 'String' - } - } + name: 'Composite', + className: 'InformationalUrl' + } + }, + isDeviceOnlyAuthSupported: { + required: false, + serializedName: 'isDeviceOnlyAuthSupported', + type: { + name: 'Boolean' } }, keyCredentials: { @@ -158,6 +173,85 @@ class ApplicationCreateParameters { } } }, + knownClientApplications: { + required: false, + serializedName: 'knownClientApplications', + type: { + name: 'Sequence', + element: { + required: false, + serializedName: 'StringElementType', + type: { + name: 'String' + } + } + } + }, + logoutUrl: { + required: false, + serializedName: 'logoutUrl', + type: { + name: 'String' + } + }, + oauth2AllowImplicitFlow: { + required: false, + serializedName: 'oauth2AllowImplicitFlow', + type: { + name: 'Boolean' + } + }, + oauth2AllowUrlPathMatching: { + required: false, + serializedName: 'oauth2AllowUrlPathMatching', + type: { + name: 'Boolean' + } + }, + oauth2Permissions: { + required: false, + serializedName: 'oauth2Permissions', + type: { + name: 'Sequence', + element: { + required: false, + serializedName: 'OAuth2PermissionElementType', + type: { + name: 'Composite', + className: 'OAuth2Permission' + } + } + } + }, + oauth2RequirePostResponse: { + required: false, + serializedName: 'oauth2RequirePostResponse', + type: { + name: 'Boolean' + } + }, + orgRestrictions: { + required: false, + serializedName: 'orgRestrictions', + type: { + name: 'Sequence', + element: { + required: false, + serializedName: 'StringElementType', + type: { + name: 'String' + } + } + } + }, + optionalClaims: { + required: false, + serializedName: 'optionalClaims', + type: { + name: 'Composite', + className: 'OptionalClaims' + } + }, passwordCredentials: { required: false, serializedName: 'passwordCredentials', @@ -185,13 +279,49 @@ class ApplicationCreateParameters { } } }, - oauth2AllowImplicitFlow: { + preAuthorizedApplications: { required: false, - serializedName: 'oauth2AllowImplicitFlow', + serializedName: 'preAuthorizedApplications', + type: { + name: 'Sequence', + element: { + required: false, + serializedName: 'PreAuthorizedApplicationElementType', + type: { + name: 'Composite', + className: 'PreAuthorizedApplication' + } + } + } + }, + publicClient: { + required: false, + serializedName: 'publicClient', type: { name: 'Boolean' } }, + publisherDomain: { + required: false, + serializedName: 'publisherDomain', + type: { + name: 'String' + } + }, + replyUrls: { + required: false, + serializedName: 'replyUrls', + type: { + name: 'Sequence', + element: { + required: false, + serializedName: 'StringElementType', + type: { + name: 'String' + } + } + } + }, requiredResourceAccess: { required: false, serializedName: 'requiredResourceAccess', @@ -218,6 +348,27 @@ class ApplicationCreateParameters { } } } + }, + samlMetadataUrl: { + required: false, + serializedName: 'samlMetadataUrl', + type: { + name: 'String' + } + }, + signInAudience: { + required: false, + serializedName: 'signInAudience', + type: { + name: 'String' + } + }, + wwwHomepage: { + required: false, + serializedName: 'wwwHomepage', + type: { + name: 'String' + } } } } diff --git a/lib/services/graphManagement/lib/models/applicationListResult.js b/lib/services/graphManagement/lib/models/applicationListResult.js index b7ec05b49f..37ec0800ee 100644 --- a/lib/services/graphManagement/lib/models/applicationListResult.js +++ b/lib/services/graphManagement/lib/models/applicationListResult.js @@ -16,7 +16,7 @@ class ApplicationListResult extends Array { /** * Create a ApplicationListResult. - * @member {string} [odatanextLink] The URL to get the next set of results. + * @property {string} [odatanextLink] The URL to get the next set of results. */ constructor() { super(); diff --git a/lib/services/graphManagement/lib/models/applicationUpdateParameters.js b/lib/services/graphManagement/lib/models/applicationUpdateParameters.js index 31ac3cb8c4..88115dced7 100644 --- a/lib/services/graphManagement/lib/models/applicationUpdateParameters.js +++ b/lib/services/graphManagement/lib/models/applicationUpdateParameters.js @@ -10,35 +10,19 @@ 'use strict'; +const models = require('./index'); + /** - * Request parameters for updating an existing application. + * Request parameters for updating a new application. * + * @extends models['ApplicationBase'] */ -class ApplicationUpdateParameters { +class ApplicationUpdateParameters extends models['ApplicationBase'] { /** * Create a ApplicationUpdateParameters. - * @member {array} [appRoles] The collection of application roles that an - * application may declare. These roles can be assigned to users, groups or - * service principals. - * @member {boolean} [availableToOtherTenants] Whether the application is - * available to other tenants - * @member {string} [displayName] The display name of the application. - * @member {string} [homepage] The home page of the application. - * @member {array} [identifierUris] A collection of URIs for the application. - * @member {array} [replyUrls] A collection of reply URLs for the - * application. - * @member {array} [keyCredentials] The list of KeyCredential objects. - * @member {array} [passwordCredentials] The list of PasswordCredential - * objects. - * @member {boolean} [oauth2AllowImplicitFlow] Whether to allow implicit - * grant flow for OAuth2 - * @member {array} [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. */ constructor() { + super(); } /** @@ -53,20 +37,29 @@ class ApplicationUpdateParameters { serializedName: 'ApplicationUpdateParameters', type: { name: 'Composite', - additionalProperties: { - type: { - name: 'Dictionary', - value: { - required: false, - serializedName: 'ObjectElementType', - type: { - name: 'Object' - } - } - } - }, className: 'ApplicationUpdateParameters', modelProperties: { + allowGuestsSignIn: { + required: false, + serializedName: 'allowGuestsSignIn', + type: { + name: 'Boolean' + } + }, + allowPassthroughUsers: { + required: false, + serializedName: 'allowPassthroughUsers', + type: { + name: 'Boolean' + } + }, + appLogoUrl: { + required: false, + serializedName: 'appLogoUrl', + type: { + name: 'String' + } + }, appRoles: { required: false, serializedName: 'appRoles', @@ -82,6 +75,20 @@ class ApplicationUpdateParameters { } } }, + appPermissions: { + required: false, + serializedName: 'appPermissions', + type: { + name: 'Sequence', + element: { + required: false, + serializedName: 'StringElementType', + type: { + name: 'String' + } + } + } + }, availableToOtherTenants: { required: false, serializedName: 'availableToOtherTenants', @@ -96,6 +103,13 @@ class ApplicationUpdateParameters { name: 'String' } }, + errorUrl: { + required: false, + serializedName: 'errorUrl', + type: { + name: 'String' + } + }, homepage: { required: false, serializedName: 'homepage', @@ -117,18 +131,19 @@ class ApplicationUpdateParameters { } } }, - replyUrls: { + informationalUrls: { required: false, - serializedName: 'replyUrls', + serializedName: 'informationalUrls', type: { - name: 'Sequence', - element: { - required: false, - serializedName: 'StringElementType', - type: { - name: 'String' - } - } + name: 'Composite', + className: 'InformationalUrl' + } + }, + isDeviceOnlyAuthSupported: { + required: false, + serializedName: 'isDeviceOnlyAuthSupported', + type: { + name: 'Boolean' } }, keyCredentials: { @@ -158,6 +173,85 @@ class ApplicationUpdateParameters { } } }, + knownClientApplications: { + required: false, + serializedName: 'knownClientApplications', + type: { + name: 'Sequence', + element: { + required: false, + serializedName: 'StringElementType', + type: { + name: 'String' + } + } + } + }, + logoutUrl: { + required: false, + serializedName: 'logoutUrl', + type: { + name: 'String' + } + }, + oauth2AllowImplicitFlow: { + required: false, + serializedName: 'oauth2AllowImplicitFlow', + type: { + name: 'Boolean' + } + }, + oauth2AllowUrlPathMatching: { + required: false, + serializedName: 'oauth2AllowUrlPathMatching', + type: { + name: 'Boolean' + } + }, + oauth2Permissions: { + required: false, + serializedName: 'oauth2Permissions', + type: { + name: 'Sequence', + element: { + required: false, + serializedName: 'OAuth2PermissionElementType', + type: { + name: 'Composite', + className: 'OAuth2Permission' + } + } + } + }, + oauth2RequirePostResponse: { + required: false, + serializedName: 'oauth2RequirePostResponse', + type: { + name: 'Boolean' + } + }, + orgRestrictions: { + required: false, + serializedName: 'orgRestrictions', + type: { + name: 'Sequence', + element: { + required: false, + serializedName: 'StringElementType', + type: { + name: 'String' + } + } + } + }, + optionalClaims: { + required: false, + serializedName: 'optionalClaims', + type: { + name: 'Composite', + className: 'OptionalClaims' + } + }, passwordCredentials: { required: false, serializedName: 'passwordCredentials', @@ -185,13 +279,49 @@ class ApplicationUpdateParameters { } } }, - oauth2AllowImplicitFlow: { + preAuthorizedApplications: { required: false, - serializedName: 'oauth2AllowImplicitFlow', + serializedName: 'preAuthorizedApplications', + type: { + name: 'Sequence', + element: { + required: false, + serializedName: 'PreAuthorizedApplicationElementType', + type: { + name: 'Composite', + className: 'PreAuthorizedApplication' + } + } + } + }, + publicClient: { + required: false, + serializedName: 'publicClient', type: { name: 'Boolean' } }, + publisherDomain: { + required: false, + serializedName: 'publisherDomain', + type: { + name: 'String' + } + }, + replyUrls: { + required: false, + serializedName: 'replyUrls', + type: { + name: 'Sequence', + element: { + required: false, + serializedName: 'StringElementType', + type: { + name: 'String' + } + } + } + }, requiredResourceAccess: { required: false, serializedName: 'requiredResourceAccess', @@ -218,6 +348,27 @@ class ApplicationUpdateParameters { } } } + }, + samlMetadataUrl: { + required: false, + serializedName: 'samlMetadataUrl', + type: { + name: 'String' + } + }, + signInAudience: { + required: false, + serializedName: 'signInAudience', + type: { + name: 'String' + } + }, + wwwHomepage: { + required: false, + serializedName: 'wwwHomepage', + type: { + name: 'String' + } } } } diff --git a/lib/services/graphManagement/lib/models/checkGroupMembershipParameters.js b/lib/services/graphManagement/lib/models/checkGroupMembershipParameters.js index d0cf630d12..e831ed3c7d 100644 --- a/lib/services/graphManagement/lib/models/checkGroupMembershipParameters.js +++ b/lib/services/graphManagement/lib/models/checkGroupMembershipParameters.js @@ -17,8 +17,8 @@ class CheckGroupMembershipParameters { /** * Create a CheckGroupMembershipParameters. - * @member {string} groupId The object ID of the group to check. - * @member {string} memberId The object ID of the contact, group, user, or + * @property {string} groupId The object ID of the group to check. + * @property {string} memberId The object ID of the contact, group, user, or * service principal to check for membership in the specified group. */ constructor() { diff --git a/lib/services/graphManagement/lib/models/checkGroupMembershipResult.js b/lib/services/graphManagement/lib/models/checkGroupMembershipResult.js index a98312b9ff..b02f7ea336 100644 --- a/lib/services/graphManagement/lib/models/checkGroupMembershipResult.js +++ b/lib/services/graphManagement/lib/models/checkGroupMembershipResult.js @@ -17,7 +17,7 @@ class CheckGroupMembershipResult { /** * Create a CheckGroupMembershipResult. - * @member {boolean} [value] True if the specified user, group, contact, or + * @property {boolean} [value] True if the specified user, group, contact, or * service principal has either direct or transitive membership in the * specified group; otherwise, false. */ diff --git a/lib/services/graphManagement/lib/models/directoryObject.js b/lib/services/graphManagement/lib/models/directoryObject.js index e90c0ebad4..93011a4764 100644 --- a/lib/services/graphManagement/lib/models/directoryObject.js +++ b/lib/services/graphManagement/lib/models/directoryObject.js @@ -17,10 +17,10 @@ class DirectoryObject { /** * Create a DirectoryObject. - * @member {string} [objectId] The object ID. - * @member {date} [deletionTimestamp] The time at which the directory object - * was deleted. - * @member {string} objectType Polymorphic Discriminator + * @property {string} [objectId] The object ID. + * @property {date} [deletionTimestamp] The time at which the directory + * object was deleted. + * @property {string} objectType Polymorphic Discriminator */ constructor() { } diff --git a/lib/services/graphManagement/lib/models/directoryObjectListResult.js b/lib/services/graphManagement/lib/models/directoryObjectListResult.js index 25d5bfff6e..54846d976b 100644 --- a/lib/services/graphManagement/lib/models/directoryObjectListResult.js +++ b/lib/services/graphManagement/lib/models/directoryObjectListResult.js @@ -16,7 +16,7 @@ class DirectoryObjectListResult extends Array { /** * Create a DirectoryObjectListResult. - * @member {string} [odatanextLink] The URL to get the next set of results. + * @property {string} [odatanextLink] The URL to get the next set of results. */ constructor() { super(); diff --git a/lib/services/graphManagement/lib/models/domain.js b/lib/services/graphManagement/lib/models/domain.js index c2465d0ca3..3f18264877 100644 --- a/lib/services/graphManagement/lib/models/domain.js +++ b/lib/services/graphManagement/lib/models/domain.js @@ -17,11 +17,12 @@ class Domain { /** * Create a Domain. - * @member {string} [authenticationType] the type of the authentication into - * the domain. - * @member {boolean} [isDefault] if this is the default domain in the tenant. - * @member {boolean} [isVerified] if this domain's ownership is verified. - * @member {string} name the domain name. + * @property {string} [authenticationType] the type of the authentication + * into the domain. + * @property {boolean} [isDefault] if this is the default domain in the + * tenant. + * @property {boolean} [isVerified] if this domain's ownership is verified. + * @property {string} name the domain name. */ constructor() { } diff --git a/lib/services/graphManagement/lib/models/getObjectsParameters.js b/lib/services/graphManagement/lib/models/getObjectsParameters.js index a05cfd7fed..63a38df4ab 100644 --- a/lib/services/graphManagement/lib/models/getObjectsParameters.js +++ b/lib/services/graphManagement/lib/models/getObjectsParameters.js @@ -17,9 +17,9 @@ class GetObjectsParameters { /** * Create a GetObjectsParameters. - * @member {array} [objectIds] The requested object IDs. - * @member {array} [types] The requested object types. - * @member {boolean} [includeDirectoryObjectReferences] If true, also + * @property {array} [objectIds] The requested object IDs. + * @property {array} [types] The requested object types. + * @property {boolean} [includeDirectoryObjectReferences] If true, also * searches for object IDs in the partner tenant. */ constructor() { diff --git a/lib/services/graphManagement/lib/models/graphError.js b/lib/services/graphManagement/lib/models/graphError.js index 23cb3eff35..b3031d9013 100644 --- a/lib/services/graphManagement/lib/models/graphError.js +++ b/lib/services/graphManagement/lib/models/graphError.js @@ -17,8 +17,8 @@ class GraphError { /** * Create a GraphError. - * @member {string} [code] Error code. - * @member {string} [message] Error message value. + * @property {string} [code] Error code. + * @property {string} [message] Error message value. */ constructor() { } diff --git a/lib/services/graphManagement/lib/models/groupAddMemberParameters.js b/lib/services/graphManagement/lib/models/groupAddMemberParameters.js index fb4956bcfe..f201c3dae0 100644 --- a/lib/services/graphManagement/lib/models/groupAddMemberParameters.js +++ b/lib/services/graphManagement/lib/models/groupAddMemberParameters.js @@ -17,7 +17,7 @@ class GroupAddMemberParameters { /** * Create a GroupAddMemberParameters. - * @member {string} url A member object URL, such as + * @property {string} url 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 diff --git a/lib/services/graphManagement/lib/models/groupCreateParameters.js b/lib/services/graphManagement/lib/models/groupCreateParameters.js index f2e8570a59..263043aa00 100644 --- a/lib/services/graphManagement/lib/models/groupCreateParameters.js +++ b/lib/services/graphManagement/lib/models/groupCreateParameters.js @@ -17,8 +17,8 @@ class GroupCreateParameters { /** * Create a GroupCreateParameters. - * @member {string} displayName Group display name - * @member {string} mailNickname Mail nickname + * @property {string} displayName Group display name + * @property {string} mailNickname Mail nickname */ constructor() { } diff --git a/lib/services/graphManagement/lib/models/groupGetMemberGroupsParameters.js b/lib/services/graphManagement/lib/models/groupGetMemberGroupsParameters.js index 810ac8971b..00a60d278c 100644 --- a/lib/services/graphManagement/lib/models/groupGetMemberGroupsParameters.js +++ b/lib/services/graphManagement/lib/models/groupGetMemberGroupsParameters.js @@ -17,7 +17,7 @@ class GroupGetMemberGroupsParameters { /** * Create a GroupGetMemberGroupsParameters. - * @member {boolean} securityEnabledOnly If true, only membership in + * @property {boolean} securityEnabledOnly If true, only membership in * security-enabled groups should be checked. Otherwise, membership in all * groups should be checked. */ diff --git a/lib/services/graphManagement/lib/models/groupListResult.js b/lib/services/graphManagement/lib/models/groupListResult.js index 328199b3b4..4c164fc034 100644 --- a/lib/services/graphManagement/lib/models/groupListResult.js +++ b/lib/services/graphManagement/lib/models/groupListResult.js @@ -16,7 +16,7 @@ class GroupListResult extends Array { /** * Create a GroupListResult. - * @member {string} [odatanextLink] The URL to get the next set of results. + * @property {string} [odatanextLink] The URL to get the next set of results. */ constructor() { super(); diff --git a/lib/services/graphManagement/lib/models/index.d.ts b/lib/services/graphManagement/lib/models/index.d.ts index 5faedd14fe..c3f4b69334 100644 --- a/lib/services/graphManagement/lib/models/index.d.ts +++ b/lib/services/graphManagement/lib/models/index.d.ts @@ -1,958 +1,1302 @@ /* * 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 } from 'ms-rest-azure'; -import { CloudError } from 'ms-rest-azure'; -import * as moment from 'moment'; +import { BaseResource, CloudError } from "ms-rest-azure"; +import * as moment from "moment"; -export { BaseResource } from 'ms-rest-azure'; -export { CloudError } from 'ms-rest-azure'; +export { + BaseResource, + CloudError +}; /** - * @class - * Initializes a new instance of the GraphError class. - * @constructor - * Active Directory error information. - * - * @member {string} [code] Error code. - * @member {string} [message] Error message value. + * 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 requied 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[]; +} + +/** + * Active Directory error information. +*/ export interface GraphError { + /** + * Error code. + */ code?: string; + /** + * Error message value. + */ message?: string; } /** - * @class - * Initializes a new instance of the DirectoryObject class. - * @constructor * Represents an Azure Active Directory object. - * - * @member {string} [objectId] The object ID. - * @member {date} [deletionTimestamp] The time at which the directory object - * was deleted. - * @member {string} objectType Polymorphic Discriminator - */ +*/ export interface DirectoryObject { + /** + * The object ID. + */ readonly objectId?: string; + /** + * The time at which the directory object was deleted. + */ readonly deletionTimestamp?: Date; + /** + * Polymorphic Discriminator + */ objectType: string; /** - * @property Describes unknown properties. The value of an unknown property - * can be of "any" type. - */ - [property: string]: any; + * Describes unknown properties. The value of an unknown property can be of "any" type. + */ + [additionalPropertyName: string]: any; } /** - * @class - * Initializes a new instance of the KeyCredential class. - * @constructor * Active Directory Key Credential information. - * - * @member {date} [startDate] Start date. - * @member {date} [endDate] End date. - * @member {string} [value] Key value. - * @member {string} [keyId] Key ID. - * @member {string} [usage] Usage. Acceptable values are 'Verify' and 'Sign'. - * @member {string} [type] Type. Acceptable values are 'AsymmetricX509Cert' and - * 'Symmetric'. - * @member {buffer} [customKeyIdentifier] Custom Key Identifier - */ +*/ export interface KeyCredential { + /** + * Start date. + */ startDate?: Date; + /** + * End date. + */ endDate?: Date; + /** + * Key value. + */ value?: string; + /** + * Key ID. + */ keyId?: string; + /** + * Usage. Acceptable values are 'Verify' and 'Sign'. + */ usage?: string; + /** + * Type. Acceptable values are 'AsymmetricX509Cert' and 'Symmetric'. + */ type?: string; - customKeyIdentifier?: Buffer; /** - * @property Describes unknown properties. The value of an unknown property - * can be of "any" type. - */ - [property: string]: any; + * Custom Key Identifier + */ + customKeyIdentifier?: string; + /** + * Describes unknown properties. The value of an unknown property can be of "any" type. + */ + [additionalPropertyName: string]: any; } /** - * @class - * Initializes a new instance of the PasswordCredential class. - * @constructor * Active Directory Password Credential information. - * - * @member {date} [startDate] Start date. - * @member {date} [endDate] End date. - * @member {string} [keyId] Key ID. - * @member {string} [value] Key value. - */ +*/ export interface PasswordCredential { + /** + * Start date. + */ startDate?: Date; + /** + * End date. + */ endDate?: Date; + /** + * Key ID. + */ keyId?: string; + /** + * Key value. + */ value?: string; /** - * @property Describes unknown properties. The value of an unknown property - * can be of "any" type. - */ - [property: string]: any; + * Custom Key Identifier + */ + customKeyIdentifier?: Buffer; + /** + * Describes unknown properties. The value of an unknown property can be of "any" type. + */ + [additionalPropertyName: string]: any; } /** - * @class - * Initializes a new instance of the ResourceAccess class. - * @constructor - * 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. - * - * @member {string} id The unique identifier for one of the OAuth2Permission or - * AppRole instances that the resource application exposes. - * @member {string} [type] Specifies whether the id property references an - * OAuth2Permission or an AppRole. Possible values are "scope" or "role". - */ + * 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 { + /** + * The unique identifier for one of the OAuth2Permission or AppRole instances that the resource + * application exposes. + */ id: string; + /** + * 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. - */ - [property: string]: any; + * Describes unknown properties. The value of an unknown property can be of "any" type. + */ + [additionalPropertyName: string]: any; } /** - * @class - * Initializes a new instance of the RequiredResourceAccess class. - * @constructor - * 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. - * - * @member {array} resourceAccess The list of OAuth2.0 permission scopes and - * app roles that the application requires from the specified resource. - * @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. - */ + * 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 { + /** + * The list of OAuth2.0 permission scopes and app roles that the application requires from the + * specified resource. + */ resourceAccess: ResourceAccess[]; + /** + * 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. - */ - [property: string]: any; -} - -/** - * @class - * Initializes a new instance of the AppRole class. - * @constructor - * @member {string} [id] Unique role identifier inside the appRoles collection. - * @member {array} [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 - * scenarios) by setting to 'Application', or to both. - * @member {string} [description] Permission help text that appears in the - * admin app assignment and consent experiences. - * @member {string} [displayName] Display name for the permission that appears - * in the admin consent and app assignment experiences. - * @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. - * @member {string} [value] Specifies the value of the roles claim that the - * application should expect in the authentication and access tokens. - */ + * Describes unknown properties. The value of an unknown property can be of "any" type. + */ + [additionalPropertyName: string]: any; +} + export interface AppRole { + /** + * Unique role identifier inside the appRoles collection. + */ id?: string; + /** + * 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[]; + /** + * Permission help text that appears in the admin app assignment and consent experiences. + */ description?: string; + /** + * Display name for the permission that appears in the admin consent and app assignment + * experiences. + */ displayName?: string; + /** + * 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; + /** + * Specifies the value of the roles claim that the application should expect in the + * authentication and access tokens. + */ value?: string; } /** - * @class - * Initializes a new instance of the ApplicationCreateParameters class. - * @constructor - * Request parameters for creating a new application. - * - * @member {array} [appRoles] The collection of application roles that an - * application may declare. These roles can be assigned to users, groups or - * service principals. - * @member {boolean} availableToOtherTenants Whether the application is - * available to other tenants. - * @member {string} displayName The display name of the application. - * @member {string} [homepage] The home page of the application. - * @member {array} identifierUris A collection of URIs for the application. - * @member {array} [replyUrls] A collection of reply URLs for the application. - * @member {array} [keyCredentials] The list of KeyCredential objects. - * @member {array} [passwordCredentials] The list of PasswordCredential - * objects. - * @member {boolean} [oauth2AllowImplicitFlow] Whether to allow implicit grant - * flow for OAuth2 - * @member {array} [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. - */ -export interface ApplicationCreateParameters { - appRoles?: AppRole[]; - availableToOtherTenants: boolean; - displayName: string; - homepage?: string; - identifierUris: string[]; - replyUrls?: string[]; - keyCredentials?: KeyCredential[]; - passwordCredentials?: PasswordCredential[]; - oauth2AllowImplicitFlow?: boolean; - requiredResourceAccess?: RequiredResourceAccess[]; + * Active Directive Application common properties shared among GET, POST and PATCH +*/ +export interface ApplicationBase { /** - * @property Describes unknown properties. The value of an unknown property - * can be of "any" type. - */ - [property: string]: any; -} - -/** - * @class - * Initializes a new instance of the ApplicationUpdateParameters class. - * @constructor - * Request parameters for updating an existing application. - * - * @member {array} [appRoles] The collection of application roles that an - * application may declare. These roles can be assigned to users, groups or - * service principals. - * @member {boolean} [availableToOtherTenants] Whether the application is - * available to other tenants - * @member {string} [displayName] The display name of the application. - * @member {string} [homepage] The home page of the application. - * @member {array} [identifierUris] A collection of URIs for the application. - * @member {array} [replyUrls] A collection of reply URLs for the application. - * @member {array} [keyCredentials] The list of KeyCredential objects. - * @member {array} [passwordCredentials] The list of PasswordCredential - * objects. - * @member {boolean} [oauth2AllowImplicitFlow] Whether to allow implicit grant - * flow for OAuth2 - * @member {array} [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. - */ -export interface ApplicationUpdateParameters { + * 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[]; + /** + * The application permissions. + */ + appPermissions?: string[]; + /** + * Whether the application is available to other tenants. + */ availableToOtherTenants?: boolean; + /** + * The display name of the application. + */ displayName?: string; + /** + * A URL provided by the author of the application to report errors when using the application. + */ + errorUrl?: string; + /** + * The home page of the application. + */ homepage?: string; + /** + * A collection of URIs for the application. + */ identifierUris?: string[]; - replyUrls?: string[]; + /** + * urls with more informations of 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[]; - passwordCredentials?: PasswordCredential[]; + /** + * 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; + /** + * 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-authorizaed 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[]; /** - * @property Describes unknown properties. The value of an unknown property - * can be of "any" type. - */ - [property: string]: any; + * The URL to the SAML metadata for the application. + */ + samlMetadataUrl?: string; + /** + * Audience for signing in to the application (AzureADMyOrganizatio, AzureADAllorganizations, + * AzureADAndMicrosofAccounts). + */ + signInAudience?: string; + /** + * The primary Web page. + */ + wwwHomepage?: string; +} + +/** + * Request parameters for creating a new application. +*/ +export interface ApplicationCreateParameters extends ApplicationBase { +} + +/** + * Request parameters for updating a new application. +*/ +export interface ApplicationUpdateParameters extends ApplicationBase { } /** - * @class - * Initializes a new instance of the Application class. - * @constructor * Active Directory application information. - * - * @member {string} [appId] The application ID. - * @member {array} [appRoles] The collection of application roles that an - * application may declare. These roles can be assigned to users, groups or - * service principals. - * @member {array} [appPermissions] The application permissions. - * @member {boolean} [availableToOtherTenants] Whether the application is be - * available to other tenants. - * @member {string} [displayName] The display name of the application. - * @member {array} [identifierUris] A collection of URIs for the application. - * @member {array} [replyUrls] A collection of reply URLs for the application. - * @member {string} [homepage] The home page of the application. - * @member {boolean} [oauth2AllowImplicitFlow] Whether to allow implicit grant - * flow for OAuth2 - * @member {array} [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. - */ +*/ export interface Application extends DirectoryObject { + /** + * The application ID. + */ appId?: string; + /** + * 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[]; + /** + * The application permissions. + */ appPermissions?: string[]; + /** + * Whether the application is available to other tenants. + */ availableToOtherTenants?: boolean; + /** + * The display name of the application. + */ displayName?: string; - identifierUris?: string[]; - replyUrls?: string[]; + /** + * A URL provided by the author of the application to report errors when using the application. + */ + errorUrl?: string; + /** + * The home page of the application. + */ homepage?: string; + /** + * A collection of URIs for the application. + */ + identifierUris?: string[]; + /** + * urls with more informations of 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; + /** + * 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-authorizaed 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 (AzureADMyOrganizatio, AzureADAllorganizations, + * AzureADAndMicrosofAccounts). + */ + signInAudience?: string; + /** + * The primary Web page. + */ + wwwHomepage?: string; } /** - * @class - * Initializes a new instance of the AddOwnerParameters class. - * @constructor * Request parameters for adding a owner to an application. - * - * @member {string} url 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. - */ +*/ export interface AddOwnerParameters { + /** + * 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. + */ url: string; /** - * @property Describes unknown properties. The value of an unknown property - * can be of "any" type. - */ - [property: string]: any; + * Describes unknown properties. The value of an unknown property can be of "any" type. + */ + [additionalPropertyName: string]: any; } /** - * @class - * Initializes a new instance of the KeyCredentialsUpdateParameters class. - * @constructor * Request parameters for a KeyCredentials update operation - * - * @member {array} value A collection of KeyCredentials. - */ +*/ export interface KeyCredentialsUpdateParameters { + /** + * A collection of KeyCredentials. + */ value: KeyCredential[]; } /** - * @class - * Initializes a new instance of the PasswordCredentialsUpdateParameters class. - * @constructor * Request parameters for a PasswordCredentials update operation. - * - * @member {array} value A collection of PasswordCredentials. - */ +*/ export interface PasswordCredentialsUpdateParameters { + /** + * A collection of PasswordCredentials. + */ value: PasswordCredential[]; } /** - * @class - * Initializes a new instance of the GroupAddMemberParameters class. - * @constructor * Request parameters for adding a member to a group. - * - * @member {string} url 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. - */ +*/ export interface GroupAddMemberParameters { + /** + * 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. + */ url: string; /** - * @property Describes unknown properties. The value of an unknown property - * can be of "any" type. - */ - [property: string]: any; + * Describes unknown properties. The value of an unknown property can be of "any" type. + */ + [additionalPropertyName: string]: any; } /** - * @class - * Initializes a new instance of the GroupCreateParameters class. - * @constructor * Request parameters for creating a new group. - * - * @member {string} displayName Group display name - * @member {string} mailNickname Mail nickname - */ +*/ export interface GroupCreateParameters { + /** + * Group display name + */ displayName: string; + /** + * Mail nickname + */ mailNickname: string; /** - * @property Describes unknown properties. The value of an unknown property - * can be of "any" type. - */ - [property: string]: any; + * Describes unknown properties. The value of an unknown property can be of "any" type. + */ + [additionalPropertyName: string]: any; } /** - * @class - * Initializes a new instance of the ADGroup class. - * @constructor * Active Directory group information. - * - * @member {string} [displayName] The display name of the group. - * @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. - * @member {string} [mailNickname] The mail alias for the group. - * @member {boolean} [securityEnabled] Whether the group is security-enable. - * @member {string} [mail] The primary email address of the group. - */ +*/ export interface ADGroup extends DirectoryObject { + /** + * The display name of the group. + */ displayName?: string; + /** + * 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; + /** + * The mail alias for the group. + */ mailNickname?: string; + /** + * Whether the group is security-enable. + */ securityEnabled?: boolean; + /** + * The primary email address of the group. + */ mail?: string; } /** - * @class - * Initializes a new instance of the GroupGetMemberGroupsParameters class. - * @constructor * Request parameters for GetMemberGroups API call. - * - * @member {boolean} securityEnabledOnly If true, only membership in - * security-enabled groups should be checked. Otherwise, membership in all - * groups should be checked. - */ +*/ export interface GroupGetMemberGroupsParameters { + /** + * 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. - */ - [property: string]: any; + * Describes unknown properties. The value of an unknown property can be of "any" type. + */ + [additionalPropertyName: string]: any; } /** - * @class - * Initializes a new instance of the CheckGroupMembershipParameters class. - * @constructor * Request parameters for IsMemberOf API call. - * - * @member {string} groupId The object ID of the group to check. - * @member {string} memberId The object ID of the contact, group, user, or - * service principal to check for membership in the specified group. - */ +*/ export interface CheckGroupMembershipParameters { + /** + * The object ID of the group to check. + */ groupId: string; + /** + * 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. - */ - [property: string]: any; + * Describes unknown properties. The value of an unknown property can be of "any" type. + */ + [additionalPropertyName: string]: any; } /** - * @class - * Initializes a new instance of the CheckGroupMembershipResult class. - * @constructor * Server response for IsMemberOf API call - * - * @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. - */ +*/ export interface CheckGroupMembershipResult { + /** + * 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. - */ - [property: string]: any; + * Describes unknown properties. The value of an unknown property can be of "any" type. + */ + [additionalPropertyName: string]: any; } /** - * @class - * Initializes a new instance of the ServicePrincipalCreateParameters class. - * @constructor - * Request parameters for creating a new service principal. - * - * @member {boolean} [accountEnabled] Whether the account is enabled - * @member {string} appId application Id - * @member {boolean} [appRoleAssignmentRequired] Specifies whether an - * AppRoleAssignment to a user or group is required before Azure AD will issue - * a user or access token to the application. - * @member {string} [displayName] The display name for the service principal. - * @member {string} [errorUrl] - * @member {string} [homepage] The URL to the homepage of the associated - * application. - * @member {array} [keyCredentials] A collection of KeyCredential objects. - * @member {array} [passwordCredentials] A collection of PasswordCredential - * objects - * @member {string} [publisherName] The display name of the tenant in which the - * associated application is specified. - * @member {array} [replyUrls] A collection of reply URLs for the service - * principal. - * @member {string} [samlMetadataUrl] - * @member {array} [servicePrincipalNames] A collection of service principal - * names. - * @member {array} [tags] - */ -export interface ServicePrincipalCreateParameters { - accountEnabled?: boolean; - appId: string; - appRoleAssignmentRequired?: boolean; - displayName?: string; - errorUrl?: string; - homepage?: string; + * Active Directory service principal common perperties shared among GET, POST and PATCH +*/ +export interface ServicePrincipalBase { + /** + * The collection of key credentials associated with the service principal. + */ keyCredentials?: KeyCredential[]; + /** + * The collection of password credentials associated with the service principal. + */ passwordCredentials?: PasswordCredential[]; - publisherName?: string; - replyUrls?: string[]; - samlMetadataUrl?: string; - servicePrincipalNames?: string[]; - tags?: string[]; /** - * @property Describes unknown properties. The value of an unknown property - * can be of "any" type. - */ - [property: string]: any; + * the type of the servie principal + */ + servicePrincipalType?: string; + /** + * whether or not the service principal account is enabled + */ + accountEnabled?: string; + /** + * Optional list of tags that you can apply to your service principals. Not nullable. + */ + tags?: string[]; } /** - * @class - * Initializes a new instance of the ServicePrincipalUpdateParameters class. - * @constructor * Request parameters for creating a new service principal. - * - * @member {boolean} [accountEnabled] Whether the account is enabled - * @member {string} [appId] application Id - * @member {boolean} [appRoleAssignmentRequired] Specifies whether an - * AppRoleAssignment to a user or group is required before Azure AD will issue - * a user or access token to the application. - * @member {string} [displayName] The display name for the service principal. - * @member {string} [errorUrl] - * @member {string} [homepage] The URL to the homepage of the associated - * application. - * @member {array} [keyCredentials] A collection of KeyCredential objects. - * @member {array} [passwordCredentials] A collection of PasswordCredential - * objects - * @member {string} [publisherName] The display name of the tenant in which the - * associated application is specified. - * @member {array} [replyUrls] A collection of reply URLs for the service - * principal. - * @member {string} [samlMetadataUrl] - * @member {array} [servicePrincipalNames] A collection of service principal - * names. - * @member {array} [tags] - */ -export interface ServicePrincipalUpdateParameters { - accountEnabled?: boolean; +*/ +export interface ServicePrincipalCreateParameters extends ServicePrincipalBase { + /** + * The application ID. + */ + appId: string; +} + +/** + * Request parameters for update an existing service principal. +*/ +export interface ServicePrincipalUpdateParameters extends ServicePrincipalBase { +} + +/** + * Active Directory service principal information. +*/ +export interface ServicePrincipal extends DirectoryObject { + /** + * whether or not the service principal account is enabled + */ + accountEnabled?: string; + /** + * altenative names + */ + alternativeNames?: string[]; + /** + * The display name exposed by the associated application. + */ + readonly appDisplayName?: string; + /** + * The application ID. + */ appId?: string; + readonly appOwnerTenantId?: string; + /** + * 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; + /** + * 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; + /** + * A URL provided by the author of the associated application to report errors when using the + * application. + */ errorUrl?: string; + /** + * The URL to the homepage of the associated application. + */ homepage?: string; + /** + * The collection of key credentials associated with the service principal. + */ keyCredentials?: KeyCredential[]; + /** + * A URL provided by the author of the associated application to logout + */ + logoutUrl?: string; + /** + * The OAuth 2.0 permissions exposed by the associated application. + */ + readonly oauth2Permissions?: OAuth2Permission[]; + /** + * The collection of password credentials associated with the service principal. + */ passwordCredentials?: PasswordCredential[]; + /** + * The thubmbprint of preferred certificate to sign the token + */ + preferredTokenSigningKeyThumbprint?: string; + /** + * The publisher's name of the associated application + */ publisherName?: string; + /** + * 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. + */ replyUrls?: string[]; + /** + * The URL to the SAML metadata of the associated application + */ samlMetadataUrl?: string; - servicePrincipalNames?: string[]; - tags?: string[]; /** - * @property Describes unknown properties. The value of an unknown property - * can be of "any" type. - */ - [property: string]: any; -} - -/** - * @class - * Initializes a new instance of the ServicePrincipal class. - * @constructor - * Active Directory service principal information. - * - * @member {string} [displayName] The display name of the service principal. - * @member {string} [appId] The application ID. - * @member {array} [appRoles] The collection of application roles that an - * application may declare. These roles can be assigned to users, groups or - * service principals. - * @member {array} [servicePrincipalNames] A collection of service principal - * names. - */ -export interface ServicePrincipal extends DirectoryObject { - displayName?: string; - appId?: string; - appRoles?: AppRole[]; + * A collection of service principal names. + */ servicePrincipalNames?: string[]; + /** + * the type of the servie principal + */ + servicePrincipalType?: string; + /** + * Optional list of tags that you can apply to your service principals. Not nullable. + */ + tags?: string[]; } /** - * @class - * Initializes a new instance of the PasswordProfile class. - * @constructor * The password profile associated with a user. - * - * @member {string} password Password - * @member {boolean} [forceChangePasswordNextLogin] Whether to force a password - * change on next login. - */ +*/ export interface PasswordProfile { + /** + * Password + */ password: string; + /** + * 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. - */ - [property: string]: any; -} - -/** - * @class - * Initializes a new instance of the UserBase class. - * @constructor - * @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 - * Directory user account with their Azure AD user object. - * @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 - * include: "US", "JP", and "GB". - * @member {string} [givenName] The given name for the user. - * @member {string} [surname] The user's surname (family name or last name). - * @member {string} [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' - */ + * Describes unknown properties. The value of an unknown property can be of "any" type. + */ + [additionalPropertyName: string]: any; +} + export interface UserBase { + /** + * 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; + /** + * 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; + /** + * The given name for the user. + */ givenName?: string; + /** + * The user's surname (family name or last name). + */ surname?: string; + /** + * 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?: string; /** - * @property Describes unknown properties. The value of an unknown property - * can be of "any" type. - */ - [property: string]: any; + * Describes unknown properties. The value of an unknown property can be of "any" type. + */ + [additionalPropertyName: string]: any; } /** - * @class - * Initializes a new instance of the UserCreateParameters class. - * @constructor * Request parameters for creating a new work or school account user. - * - * @member {boolean} accountEnabled Whether the account is enabled. - * @member {string} displayName The display name of the user. - * @member {object} passwordProfile Password Profile - * @member {string} [passwordProfile.password] Password - * @member {boolean} [passwordProfile.forceChangePasswordNextLogin] Whether to - * force a password change on next login. - * @member {string} userPrincipalName The user principal name - * (someuser@contoso.com). It must contain one of the verified domains for the - * tenant. - * @member {string} mailNickname The mail alias for the user. - * @member {string} [mail] The primary email address of the user. - */ +*/ export interface UserCreateParameters extends UserBase { + /** + * Whether the account is enabled. + */ accountEnabled: boolean; + /** + * The display name of the user. + */ displayName: string; + /** + * Password Profile + */ passwordProfile: PasswordProfile; + /** + * The user principal name (someuser@contoso.com). It must contain one of the verified domains + * for the tenant. + */ userPrincipalName: string; + /** + * The mail alias for the user. + */ mailNickname: string; + /** + * The primary email address of the user. + */ mail?: string; } /** - * @class - * Initializes a new instance of the UserUpdateParameters class. - * @constructor * Request parameters for updating an existing work or school account user. - * - * @member {boolean} [accountEnabled] Whether the account is enabled. - * @member {string} [displayName] The display name of the user. - * @member {object} [passwordProfile] The password profile of the user. - * @member {string} [passwordProfile.password] Password - * @member {boolean} [passwordProfile.forceChangePasswordNextLogin] Whether to - * force a password change on next login. - * @member {string} [userPrincipalName] The user principal name - * (someuser@contoso.com). It must contain one of the verified domains for the - * tenant. - * @member {string} [mailNickname] The mail alias for the user. - */ +*/ export interface UserUpdateParameters extends UserBase { + /** + * Whether the account is enabled. + */ accountEnabled?: boolean; + /** + * The display name of the user. + */ displayName?: string; + /** + * The password profile of the user. + */ passwordProfile?: PasswordProfile; + /** + * The user principal name (someuser@contoso.com). It must contain one of the verified domains + * for the tenant. + */ userPrincipalName?: string; + /** + * The mail alias for the user. + */ mailNickname?: string; } /** - * @class - * Initializes a new instance of the SignInName class. - * @constructor - * Contains information about a sign-in name of a local account user in an - * Azure Active Directory B2C tenant. - * - * @member {string} [type] A string value that can be used to classify user - * sign-in types in your directory, such as 'emailAddress' or 'userName'. - * @member {string} [value] The sign-in used by the local account. Must be - * unique across the company/tenant. For example, 'johnc@example.com'. - */ + * Contains information about a sign-in name of a local account user in an Azure Active Directory + * B2C tenant. +*/ export interface SignInName { + /** + * A string value that can be used to classify user sign-in types in your directory, such as + * 'emailAddress' or 'userName'. + */ type?: string; + /** + * 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. - */ - [property: string]: any; + * Describes unknown properties. The value of an unknown property can be of "any" type. + */ + [additionalPropertyName: string]: any; } /** - * @class - * Initializes a new instance of the User class. - * @constructor * Active Directory user information. - * - * @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 - * Directory user account with their Azure AD user object. - * @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 - * include: "US", "JP", and "GB". - * @member {string} [givenName] The given name for the user. - * @member {string} [surname] The user's surname (family name or last name). - * @member {string} [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' - * @member {boolean} [accountEnabled] Whether the account is enabled. - * @member {string} [displayName] The display name of the user. - * @member {string} [userPrincipalName] The principal name of the user. - * @member {string} [mailNickname] The mail alias for the user. - * @member {string} [mail] The primary email address of the user. - * @member {array} [signInNames] The sign-in names of the user. - */ +*/ export interface User extends DirectoryObject { + /** + * 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; + /** + * 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; + /** + * The given name for the user. + */ givenName?: string; + /** + * The user's surname (family name or last name). + */ surname?: string; + /** + * 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?: string; + /** + * Whether the account is enabled. + */ accountEnabled?: boolean; + /** + * The display name of the user. + */ displayName?: string; + /** + * The principal name of the user. + */ userPrincipalName?: string; + /** + * The mail alias for the user. + */ mailNickname?: string; + /** + * The primary email address of the user. + */ mail?: string; + /** + * The sign-in names of the user. + */ signInNames?: SignInName[]; } /** - * @class - * Initializes a new instance of the UserGetMemberGroupsParameters class. - * @constructor * Request parameters for GetMemberGroups API call. - * - * @member {boolean} securityEnabledOnly If true, only membership in - * security-enabled groups should be checked. Otherwise, membership in all - * groups should be checked. - */ +*/ export interface UserGetMemberGroupsParameters { + /** + * 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. - */ - [property: string]: any; + * Describes unknown properties. The value of an unknown property can be of "any" type. + */ + [additionalPropertyName: string]: any; } /** - * @class - * Initializes a new instance of the GetObjectsParameters class. - * @constructor * Request parameters for the GetObjectsByObjectIds API. - * - * @member {array} [objectIds] The requested object IDs. - * @member {array} [types] The requested object types. - * @member {boolean} [includeDirectoryObjectReferences] If true, also searches - * for object IDs in the partner tenant. - */ +*/ export interface GetObjectsParameters { + /** + * The requested object IDs. + */ objectIds?: string[]; + /** + * The requested object types. + */ types?: string[]; + /** + * 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. - */ - [property: string]: any; + * Describes unknown properties. The value of an unknown property can be of "any" type. + */ + [additionalPropertyName: string]: any; } /** - * @class - * Initializes a new instance of the Domain class. - * @constructor * Active Directory Domain information. - * - * @member {string} [authenticationType] the type of the authentication into - * the domain. - * @member {boolean} [isDefault] if this is the default domain in the tenant. - * @member {boolean} [isVerified] if this domain's ownership is verified. - * @member {string} name the domain name. - */ +*/ export interface Domain { + /** + * the type of the authentication into the domain. + */ readonly authenticationType?: string; + /** + * if this is the default domain in the tenant. + */ readonly isDefault?: boolean; + /** + * if this domain's ownership is verified. + */ readonly isVerified?: boolean; + /** + * the domain name. + */ name: string; /** - * @property Describes unknown properties. The value of an unknown property - * can be of "any" type. - */ - [property: string]: any; -} - -/** - * @class - * Initializes a new instance of the Permissions class. - * @constructor - * @member {string} [odatatype] - * Microsoft.DirectoryServices.OAuth2PermissionGrant - * @member {string} [clientId] The objectId of the Service Principal associated - * with the app - * @member {string} [consentType] Typically set to AllPrincipals - * @member {object} [principalId] Set to null if AllPrincipals is set - * @member {string} [resourceId] Service Principal Id of the resource you want - * to grant - * @member {string} [scope] Typically set to user_impersonation - * @member {string} [startTime] Start time for TTL - * @member {string} [expiryTime] Expiry time for TTL - */ + * Describes unknown properties. The value of an unknown property can be of "any" type. + */ + [additionalPropertyName: string]: any; +} + export interface Permissions { + /** + * Microsoft.DirectoryServices.OAuth2PermissionGrant + */ odatatype?: string; + /** + * The objectId of the Service Principal associated with the app + */ clientId?: string; + /** + * The objectId of the permission grant + */ + objectId?: string; + /** + * Typically set to AllPrincipals + */ consentType?: string; + /** + * Set to null if AllPrincipals is set + */ principalId?: any; + /** + * Service Principal Id of the resource you want to grant + */ resourceId?: string; + /** + * Typically set to user_impersonation + */ scope?: string; + /** + * Start time for TTL + */ startTime?: string; + /** + * Expiry time for TTL + */ expiryTime?: string; } - /** - * @class - * Initializes a new instance of the DirectoryObjectListResult class. - * @constructor * DirectoryObject list operation result. - * - * @member {string} [odatanextLink] The URL to get the next set of results. - */ +*/ export interface DirectoryObjectListResult extends Array { + /** + * The URL to get the next set of results. + */ odatanextLink?: string; } /** - * @class - * Initializes a new instance of the ApplicationListResult class. - * @constructor * Application list operation result. - * - * @member {string} [odatanextLink] The URL to get the next set of results. - */ +*/ export interface ApplicationListResult extends Array { + /** + * The URL to get the next set of results. + */ odatanextLink?: string; } /** - * @class - * Initializes a new instance of the KeyCredentialListResult class. - * @constructor * KeyCredential list operation result. - * - */ +*/ export interface KeyCredentialListResult extends Array { } /** - * @class - * Initializes a new instance of the PasswordCredentialListResult class. - * @constructor * PasswordCredential list operation result. - * - */ +*/ export interface PasswordCredentialListResult extends Array { } /** - * @class - * Initializes a new instance of the GroupListResult class. - * @constructor * Server response for Get tenant groups API call - * - * @member {string} [odatanextLink] The URL to get the next set of results. - */ +*/ export interface GroupListResult extends Array { + /** + * The URL to get the next set of results. + */ odatanextLink?: string; } /** - * @class - * Initializes a new instance of the GroupGetMemberGroupsResult class. - * @constructor * Server response for GetMemberGroups API call. - * - */ +*/ export interface GroupGetMemberGroupsResult extends Array { } /** - * @class - * Initializes a new instance of the ServicePrincipalListResult class. - * @constructor * Server response for get tenant service principals API call. - * - * @member {string} [odatanextLink] the URL to get the next set of results. - */ +*/ export interface ServicePrincipalListResult extends Array { + /** + * the URL to get the next set of results. + */ odatanextLink?: string; } /** - * @class - * Initializes a new instance of the UserListResult class. - * @constructor * Server response for Get tenant users API call. - * - * @member {string} [odatanextLink] The URL to get the next set of results. - */ +*/ export interface UserListResult extends Array { + /** + * The URL to get the next set of results. + */ odatanextLink?: string; } /** - * @class - * Initializes a new instance of the UserGetMemberGroupsResult class. - * @constructor * Server response for GetMemberGroups API call. - * - */ +*/ export interface UserGetMemberGroupsResult extends Array { } /** - * @class - * Initializes a new instance of the DomainListResult class. - * @constructor * Server response for Get tenant domains API call. - * - */ +*/ export interface DomainListResult extends Array { } + +/** + * Server response for get permissions grants +*/ +export interface PermissionsListResult extends Array { + /** + * the URL to get the next set of results. + */ + odatanextLink?: string; +} diff --git a/lib/services/graphManagement/lib/models/index.js b/lib/services/graphManagement/lib/models/index.js index f0927b9540..7a0bb7f227 100644 --- a/lib/services/graphManagement/lib/models/index.js +++ b/lib/services/graphManagement/lib/models/index.js @@ -18,6 +18,13 @@ var msRestAzure = require('ms-rest-azure'); exports.BaseResource = msRestAzure.BaseResource; exports.CloudError = msRestAzure.CloudError; +exports.InformationalUrl = require('./informationalUrl'); +exports.OAuth2Permission = require('./oAuth2Permission'); +exports.OptionalClaim = require('./optionalClaim'); +exports.OptionalClaims = require('./optionalClaims'); +exports.PreAuthorizedApplicationPermission = require('./preAuthorizedApplicationPermission'); +exports.PreAuthorizedApplicationExtension = require('./preAuthorizedApplicationExtension'); +exports.PreAuthorizedApplication = require('./preAuthorizedApplication'); exports.GraphError = require('./graphError'); exports.DirectoryObject = require('./directoryObject'); exports.KeyCredential = require('./keyCredential'); @@ -25,6 +32,7 @@ exports.PasswordCredential = require('./passwordCredential'); exports.ResourceAccess = require('./resourceAccess'); exports.RequiredResourceAccess = require('./requiredResourceAccess'); exports.AppRole = require('./appRole'); +exports.ApplicationBase = require('./applicationBase'); exports.ApplicationCreateParameters = require('./applicationCreateParameters'); exports.ApplicationUpdateParameters = require('./applicationUpdateParameters'); exports.Application = require('./application'); @@ -37,6 +45,7 @@ exports.ADGroup = require('./aDGroup'); exports.GroupGetMemberGroupsParameters = require('./groupGetMemberGroupsParameters'); exports.CheckGroupMembershipParameters = require('./checkGroupMembershipParameters'); exports.CheckGroupMembershipResult = require('./checkGroupMembershipResult'); +exports.ServicePrincipalBase = require('./servicePrincipalBase'); exports.ServicePrincipalCreateParameters = require('./servicePrincipalCreateParameters'); exports.ServicePrincipalUpdateParameters = require('./servicePrincipalUpdateParameters'); exports.ServicePrincipal = require('./servicePrincipal'); @@ -60,6 +69,7 @@ exports.ServicePrincipalListResult = require('./servicePrincipalListResult'); exports.UserListResult = require('./userListResult'); exports.UserGetMemberGroupsResult = require('./userGetMemberGroupsResult'); exports.DomainListResult = require('./domainListResult'); +exports.PermissionsListResult = require('./permissionsListResult'); exports.discriminators = { 'DirectoryObject' : exports.DirectoryObject, 'DirectoryObject.Application' : exports.Application, diff --git a/lib/services/graphManagement/lib/models/informationalUrl.js b/lib/services/graphManagement/lib/models/informationalUrl.js new file mode 100644 index 0000000000..eb71321731 --- /dev/null +++ b/lib/services/graphManagement/lib/models/informationalUrl.js @@ -0,0 +1,78 @@ +/* + * 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. + */ + +'use strict'; + +/** + * 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. + * + */ +class InformationalUrl { + /** + * Create a InformationalUrl. + * @property {string} [termsOfService] The terms of service URI + * @property {string} [marketing] The marketing URI + * @property {string} [privacy] The privacy policy URI + * @property {string} [support] The support URI + */ + constructor() { + } + + /** + * Defines the metadata of InformationalUrl + * + * @returns {object} metadata of InformationalUrl + * + */ + mapper() { + return { + required: false, + serializedName: 'InformationalUrl', + type: { + name: 'Composite', + className: 'InformationalUrl', + modelProperties: { + termsOfService: { + required: false, + serializedName: 'termsOfService', + type: { + name: 'String' + } + }, + marketing: { + required: false, + serializedName: 'marketing', + type: { + name: 'String' + } + }, + privacy: { + required: false, + serializedName: 'privacy', + type: { + name: 'String' + } + }, + support: { + required: false, + serializedName: 'support', + type: { + name: 'String' + } + } + } + } + }; + } +} + +module.exports = InformationalUrl; diff --git a/lib/services/graphManagement/lib/models/keyCredential.js b/lib/services/graphManagement/lib/models/keyCredential.js index 742322cbbc..f127c00479 100644 --- a/lib/services/graphManagement/lib/models/keyCredential.js +++ b/lib/services/graphManagement/lib/models/keyCredential.js @@ -17,14 +17,15 @@ class KeyCredential { /** * Create a KeyCredential. - * @member {date} [startDate] Start date. - * @member {date} [endDate] End date. - * @member {string} [value] Key value. - * @member {string} [keyId] Key ID. - * @member {string} [usage] Usage. Acceptable values are 'Verify' and 'Sign'. - * @member {string} [type] Type. Acceptable values are 'AsymmetricX509Cert' + * @property {date} [startDate] Start date. + * @property {date} [endDate] End date. + * @property {string} [value] Key value. + * @property {string} [keyId] Key ID. + * @property {string} [usage] Usage. Acceptable values are 'Verify' and + * 'Sign'. + * @property {string} [type] Type. Acceptable values are 'AsymmetricX509Cert' * and 'Symmetric'. - * @member {buffer} [customKeyIdentifier] Custom Key Identifier + * @property {string} [customKeyIdentifier] Custom Key Identifier */ constructor() { } @@ -101,7 +102,7 @@ class KeyCredential { required: false, serializedName: 'customKeyIdentifier', type: { - name: 'ByteArray' + name: 'String' } } } diff --git a/lib/services/graphManagement/lib/models/keyCredentialsUpdateParameters.js b/lib/services/graphManagement/lib/models/keyCredentialsUpdateParameters.js index 6496544fd8..aaf3334c41 100644 --- a/lib/services/graphManagement/lib/models/keyCredentialsUpdateParameters.js +++ b/lib/services/graphManagement/lib/models/keyCredentialsUpdateParameters.js @@ -17,7 +17,7 @@ class KeyCredentialsUpdateParameters { /** * Create a KeyCredentialsUpdateParameters. - * @member {array} value A collection of KeyCredentials. + * @property {array} value A collection of KeyCredentials. */ constructor() { } diff --git a/lib/services/graphManagement/lib/models/oAuth2Permission.js b/lib/services/graphManagement/lib/models/oAuth2Permission.js new file mode 100644 index 0000000000..cafb6bb101 --- /dev/null +++ b/lib/services/graphManagement/lib/models/oAuth2Permission.js @@ -0,0 +1,126 @@ +/* + * 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. + */ + +'use strict'; + +/** + * 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. + * + */ +class OAuth2Permission { + /** + * Create a OAuth2Permission. + * @property {string} [adminConsentDescription] Permission help text that + * appears in the admin consent and app assignment experiences. + * @property {string} [adminConsentDisplayName] Display name for the + * permission that appears in the admin consent and app assignment + * experiences. + * @property {string} [id] Unique scope permission identifier inside the + * oauth2Permissions collection. + * @property {boolean} [isEnabled] 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. + * @property {string} [type] 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". + * @property {string} [userConsentDescription] Permission help text that + * appears in the end user consent experience. + * @property {string} [userConsentDisplayName] Display name for the + * permission that appears in the end user consent experience. + * @property {string} [value] The value of the scope claim that the resource + * application should expect in the OAuth 2.0 access token. + */ + constructor() { + } + + /** + * Defines the metadata of OAuth2Permission + * + * @returns {object} metadata of OAuth2Permission + * + */ + mapper() { + return { + required: false, + serializedName: 'OAuth2Permission', + type: { + name: 'Composite', + className: 'OAuth2Permission', + modelProperties: { + adminConsentDescription: { + required: false, + serializedName: 'adminConsentDescription', + type: { + name: 'String' + } + }, + adminConsentDisplayName: { + required: false, + serializedName: 'adminConsentDisplayName', + type: { + name: 'String' + } + }, + id: { + required: false, + serializedName: 'id', + type: { + name: 'String' + } + }, + isEnabled: { + required: false, + serializedName: 'isEnabled', + type: { + name: 'Boolean' + } + }, + type: { + required: false, + serializedName: 'type', + type: { + name: 'String' + } + }, + userConsentDescription: { + required: false, + serializedName: 'userConsentDescription', + type: { + name: 'String' + } + }, + userConsentDisplayName: { + required: false, + serializedName: 'userConsentDisplayName', + type: { + name: 'String' + } + }, + value: { + required: false, + serializedName: 'value', + type: { + name: 'String' + } + } + } + } + }; + } +} + +module.exports = OAuth2Permission; diff --git a/lib/services/graphManagement/lib/models/optionalClaim.js b/lib/services/graphManagement/lib/models/optionalClaim.js new file mode 100644 index 0000000000..988f976563 --- /dev/null +++ b/lib/services/graphManagement/lib/models/optionalClaim.js @@ -0,0 +1,76 @@ +/* + * 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. + */ + +'use strict'; + +/** + * Specifying the claims to be included in a token. + * + */ +class OptionalClaim { + /** + * Create a OptionalClaim. + * @property {string} [name] Claim name. + * @property {string} [source] Claim source. + * @property {boolean} [essential] Is this a requied claim. + * @property {object} [additionalProperties] + */ + constructor() { + } + + /** + * Defines the metadata of OptionalClaim + * + * @returns {object} metadata of OptionalClaim + * + */ + mapper() { + return { + required: false, + serializedName: 'OptionalClaim', + type: { + name: 'Composite', + className: 'OptionalClaim', + modelProperties: { + name: { + required: false, + serializedName: 'name', + type: { + name: 'String' + } + }, + source: { + required: false, + serializedName: 'source', + type: { + name: 'String' + } + }, + essential: { + required: false, + serializedName: 'essential', + type: { + name: 'Boolean' + } + }, + additionalProperties: { + required: false, + serializedName: 'additionalProperties', + type: { + name: 'Object' + } + } + } + } + }; + } +} + +module.exports = OptionalClaim; diff --git a/lib/services/graphManagement/lib/models/optionalClaims.js b/lib/services/graphManagement/lib/models/optionalClaims.js new file mode 100644 index 0000000000..bb81192cce --- /dev/null +++ b/lib/services/graphManagement/lib/models/optionalClaims.js @@ -0,0 +1,95 @@ +/* + * 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. + */ + +'use strict'; + +/** + * Specifying the claims to be included in the token. + * + */ +class OptionalClaims { + /** + * Create a OptionalClaims. + * @property {array} [idToken] Optional claims requested to be included in + * the id token. + * @property {array} [accessToken] Optional claims requested to be included + * in the access token. + * @property {array} [samlToken] Optional claims requested to be included in + * the saml token. + */ + constructor() { + } + + /** + * Defines the metadata of OptionalClaims + * + * @returns {object} metadata of OptionalClaims + * + */ + mapper() { + return { + required: false, + serializedName: 'OptionalClaims', + type: { + name: 'Composite', + className: 'OptionalClaims', + modelProperties: { + idToken: { + required: false, + serializedName: 'idToken', + type: { + name: 'Sequence', + element: { + required: false, + serializedName: 'OptionalClaimElementType', + type: { + name: 'Composite', + className: 'OptionalClaim' + } + } + } + }, + accessToken: { + required: false, + serializedName: 'accessToken', + type: { + name: 'Sequence', + element: { + required: false, + serializedName: 'OptionalClaimElementType', + type: { + name: 'Composite', + className: 'OptionalClaim' + } + } + } + }, + samlToken: { + required: false, + serializedName: 'samlToken', + type: { + name: 'Sequence', + element: { + required: false, + serializedName: 'OptionalClaimElementType', + type: { + name: 'Composite', + className: 'OptionalClaim' + } + } + } + } + } + } + }; + } +} + +module.exports = OptionalClaims; diff --git a/lib/services/graphManagement/lib/models/passwordCredential.js b/lib/services/graphManagement/lib/models/passwordCredential.js index 02120fcc77..b1901ef48b 100644 --- a/lib/services/graphManagement/lib/models/passwordCredential.js +++ b/lib/services/graphManagement/lib/models/passwordCredential.js @@ -17,10 +17,11 @@ class PasswordCredential { /** * Create a PasswordCredential. - * @member {date} [startDate] Start date. - * @member {date} [endDate] End date. - * @member {string} [keyId] Key ID. - * @member {string} [value] Key value. + * @property {date} [startDate] Start date. + * @property {date} [endDate] End date. + * @property {string} [keyId] Key ID. + * @property {string} [value] Key value. + * @property {buffer} [customKeyIdentifier] Custom Key Identifier */ constructor() { } @@ -78,6 +79,13 @@ class PasswordCredential { type: { name: 'String' } + }, + customKeyIdentifier: { + required: false, + serializedName: 'customKeyIdentifier', + type: { + name: 'ByteArray' + } } } } diff --git a/lib/services/graphManagement/lib/models/passwordCredentialsUpdateParameters.js b/lib/services/graphManagement/lib/models/passwordCredentialsUpdateParameters.js index ca2cc587c1..6bb7de753e 100644 --- a/lib/services/graphManagement/lib/models/passwordCredentialsUpdateParameters.js +++ b/lib/services/graphManagement/lib/models/passwordCredentialsUpdateParameters.js @@ -17,7 +17,7 @@ class PasswordCredentialsUpdateParameters { /** * Create a PasswordCredentialsUpdateParameters. - * @member {array} value A collection of PasswordCredentials. + * @property {array} value A collection of PasswordCredentials. */ constructor() { } diff --git a/lib/services/graphManagement/lib/models/passwordProfile.js b/lib/services/graphManagement/lib/models/passwordProfile.js index 5be23506eb..ce8955eea0 100644 --- a/lib/services/graphManagement/lib/models/passwordProfile.js +++ b/lib/services/graphManagement/lib/models/passwordProfile.js @@ -17,8 +17,8 @@ class PasswordProfile { /** * Create a PasswordProfile. - * @member {string} password Password - * @member {boolean} [forceChangePasswordNextLogin] Whether to force a + * @property {string} password Password + * @property {boolean} [forceChangePasswordNextLogin] Whether to force a * password change on next login. */ constructor() { diff --git a/lib/services/graphManagement/lib/models/permissions.js b/lib/services/graphManagement/lib/models/permissions.js index b2961bb5f6..7d35d353c3 100644 --- a/lib/services/graphManagement/lib/models/permissions.js +++ b/lib/services/graphManagement/lib/models/permissions.js @@ -16,17 +16,18 @@ class Permissions { /** * Create a Permissions. - * @member {string} [odatatype] + * @property {string} [odatatype] * Microsoft.DirectoryServices.OAuth2PermissionGrant - * @member {string} [clientId] The objectId of the Service Principal + * @property {string} [clientId] The objectId of the Service Principal * associated with the app - * @member {string} [consentType] Typically set to AllPrincipals - * @member {object} [principalId] Set to null if AllPrincipals is set - * @member {string} [resourceId] Service Principal Id of the resource you + * @property {string} [objectId] The objectId of the permission grant + * @property {string} [consentType] Typically set to AllPrincipals + * @property {object} [principalId] Set to null if AllPrincipals is set + * @property {string} [resourceId] Service Principal Id of the resource you * want to grant - * @member {string} [scope] Typically set to user_impersonation - * @member {string} [startTime] Start time for TTL - * @member {string} [expiryTime] Expiry time for TTL + * @property {string} [scope] Typically set to user_impersonation + * @property {string} [startTime] Start time for TTL + * @property {string} [expiryTime] Expiry time for TTL */ constructor() { } @@ -59,6 +60,13 @@ class Permissions { name: 'String' } }, + objectId: { + required: false, + serializedName: 'objectId', + type: { + name: 'String' + } + }, consentType: { required: false, serializedName: 'consentType', diff --git a/lib/services/graphManagement/lib/models/permissionsListResult.js b/lib/services/graphManagement/lib/models/permissionsListResult.js new file mode 100644 index 0000000000..321486b7c7 --- /dev/null +++ b/lib/services/graphManagement/lib/models/permissionsListResult.js @@ -0,0 +1,67 @@ +/* + * 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. + */ + +'use strict'; + +/** + * Server response for get permissions grants + */ +class PermissionsListResult extends Array { + /** + * Create a PermissionsListResult. + * @property {string} [odatanextLink] the URL to get the next set of results. + */ + constructor() { + super(); + } + + /** + * Defines the metadata of PermissionsListResult + * + * @returns {object} metadata of PermissionsListResult + * + */ + mapper() { + return { + required: false, + serializedName: 'PermissionsListResult', + type: { + name: 'Composite', + className: 'PermissionsListResult', + modelProperties: { + value: { + required: false, + serializedName: '', + type: { + name: 'Sequence', + element: { + required: false, + serializedName: 'PermissionsElementType', + type: { + name: 'Composite', + className: 'Permissions' + } + } + } + }, + odatanextLink: { + required: false, + serializedName: 'odata\\.nextLink', + type: { + name: 'String' + } + } + } + } + }; + } +} + +module.exports = PermissionsListResult; diff --git a/lib/services/graphManagement/lib/models/preAuthorizedApplication.js b/lib/services/graphManagement/lib/models/preAuthorizedApplication.js new file mode 100644 index 0000000000..be174337fb --- /dev/null +++ b/lib/services/graphManagement/lib/models/preAuthorizedApplication.js @@ -0,0 +1,86 @@ +/* + * 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. + */ + +'use strict'; + +/** + * Contains information about pre authorized client application. + * + */ +class PreAuthorizedApplication { + /** + * Create a PreAuthorizedApplication. + * @property {string} [appId] Represents the application id. + * @property {array} [permissions] Collection of required app + * permissions/entitlements from the resource application. + * @property {array} [extensions] Collection of extensions from the resource + * application. + */ + constructor() { + } + + /** + * Defines the metadata of PreAuthorizedApplication + * + * @returns {object} metadata of PreAuthorizedApplication + * + */ + mapper() { + return { + required: false, + serializedName: 'PreAuthorizedApplication', + type: { + name: 'Composite', + className: 'PreAuthorizedApplication', + modelProperties: { + appId: { + required: false, + serializedName: 'appId', + type: { + name: 'String' + } + }, + permissions: { + required: false, + serializedName: 'permissions', + type: { + name: 'Sequence', + element: { + required: false, + serializedName: 'PreAuthorizedApplicationPermissionElementType', + type: { + name: 'Composite', + className: 'PreAuthorizedApplicationPermission' + } + } + } + }, + extensions: { + required: false, + serializedName: 'extensions', + type: { + name: 'Sequence', + element: { + required: false, + serializedName: 'PreAuthorizedApplicationExtensionElementType', + type: { + name: 'Composite', + className: 'PreAuthorizedApplicationExtension' + } + } + } + } + } + } + }; + } +} + +module.exports = PreAuthorizedApplication; diff --git a/lib/services/graphManagement/lib/models/preAuthorizedApplicationExtension.js b/lib/services/graphManagement/lib/models/preAuthorizedApplicationExtension.js new file mode 100644 index 0000000000..c4a3babfaf --- /dev/null +++ b/lib/services/graphManagement/lib/models/preAuthorizedApplicationExtension.js @@ -0,0 +1,60 @@ +/* + * 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. + */ + +'use strict'; + +/** + * Representation of an app PreAuthorizedApplicationExtension required by a pre + * authorized client app. + * + */ +class PreAuthorizedApplicationExtension { + /** + * Create a PreAuthorizedApplicationExtension. + * @property {array} [conditions] The extension's conditions. + */ + constructor() { + } + + /** + * Defines the metadata of PreAuthorizedApplicationExtension + * + * @returns {object} metadata of PreAuthorizedApplicationExtension + * + */ + mapper() { + return { + required: false, + serializedName: 'PreAuthorizedApplicationExtension', + type: { + name: 'Composite', + className: 'PreAuthorizedApplicationExtension', + modelProperties: { + conditions: { + required: false, + serializedName: 'conditions', + type: { + name: 'Sequence', + element: { + required: false, + serializedName: 'StringElementType', + type: { + name: 'String' + } + } + } + } + } + } + }; + } +} + +module.exports = PreAuthorizedApplicationExtension; diff --git a/lib/services/graphManagement/lib/models/preAuthorizedApplicationPermission.js b/lib/services/graphManagement/lib/models/preAuthorizedApplicationPermission.js new file mode 100644 index 0000000000..118d6b6476 --- /dev/null +++ b/lib/services/graphManagement/lib/models/preAuthorizedApplicationPermission.js @@ -0,0 +1,68 @@ +/* + * 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. + */ + +'use strict'; + +/** + * Contains information about the pre-authorized permissions. + * + */ +class PreAuthorizedApplicationPermission { + /** + * Create a PreAuthorizedApplicationPermission. + * @property {boolean} [directAccessGrant] Indicates whether the permission + * set is DirectAccess or impersonation. + * @property {array} [accessGrants] The list of permissions. + */ + constructor() { + } + + /** + * Defines the metadata of PreAuthorizedApplicationPermission + * + * @returns {object} metadata of PreAuthorizedApplicationPermission + * + */ + mapper() { + return { + required: false, + serializedName: 'PreAuthorizedApplicationPermission', + type: { + name: 'Composite', + className: 'PreAuthorizedApplicationPermission', + modelProperties: { + directAccessGrant: { + required: false, + serializedName: 'directAccessGrant', + type: { + name: 'Boolean' + } + }, + accessGrants: { + required: false, + serializedName: 'accessGrants', + type: { + name: 'Sequence', + element: { + required: false, + serializedName: 'StringElementType', + type: { + name: 'String' + } + } + } + } + } + } + }; + } +} + +module.exports = PreAuthorizedApplicationPermission; diff --git a/lib/services/graphManagement/lib/models/requiredResourceAccess.js b/lib/services/graphManagement/lib/models/requiredResourceAccess.js index fa512813cb..82275b9fac 100644 --- a/lib/services/graphManagement/lib/models/requiredResourceAccess.js +++ b/lib/services/graphManagement/lib/models/requiredResourceAccess.js @@ -16,15 +16,15 @@ * 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. + * collection of RequiredResourceAccess. * */ class RequiredResourceAccess { /** * Create a RequiredResourceAccess. - * @member {array} resourceAccess The list of OAuth2.0 permission scopes and - * app roles that the application requires from the specified resource. - * @member {string} [resourceAppId] The unique identifier for the resource + * @property {array} resourceAccess The list of OAuth2.0 permission scopes + * and app roles that the application requires from the specified resource. + * @property {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. */ diff --git a/lib/services/graphManagement/lib/models/resourceAccess.js b/lib/services/graphManagement/lib/models/resourceAccess.js index 95ed68e953..045b88105f 100644 --- a/lib/services/graphManagement/lib/models/resourceAccess.js +++ b/lib/services/graphManagement/lib/models/resourceAccess.js @@ -19,9 +19,10 @@ class ResourceAccess { /** * Create a ResourceAccess. - * @member {string} id The unique identifier for one of the OAuth2Permission - * or AppRole instances that the resource application exposes. - * @member {string} [type] Specifies whether the id property references an + * @property {string} id The unique identifier for one of the + * OAuth2Permission or AppRole instances that the resource application + * exposes. + * @property {string} [type] Specifies whether the id property references an * OAuth2Permission or an AppRole. Possible values are "scope" or "role". */ constructor() { diff --git a/lib/services/graphManagement/lib/models/servicePrincipal.js b/lib/services/graphManagement/lib/models/servicePrincipal.js index 884bfe3290..284b9b8cc4 100644 --- a/lib/services/graphManagement/lib/models/servicePrincipal.js +++ b/lib/services/graphManagement/lib/models/servicePrincipal.js @@ -20,13 +20,48 @@ const models = require('./index'); class ServicePrincipal extends models['DirectoryObject'] { /** * Create a ServicePrincipal. - * @member {string} [displayName] The display name of the service principal. - * @member {string} [appId] The application ID. - * @member {array} [appRoles] The collection of application roles that an + * @property {string} [accountEnabled] whether or not the service principal + * account is enabled + * @property {array} [alternativeNames] altenative names + * @property {string} [appDisplayName] The display name exposed by the + * associated application. + * @property {string} [appId] The application ID. + * @property {string} [appOwnerTenantId] + * @property {boolean} [appRoleAssignmentRequired] Specifies whether an + * AppRoleAssignment to a user or group is required before Azure AD will + * issue a user or access token to the application. + * @property {array} [appRoles] The collection of application roles that an * application may declare. These roles can be assigned to users, groups or * service principals. - * @member {array} [servicePrincipalNames] A collection of service principal - * names. + * @property {string} [displayName] The display name of the service + * principal. + * @property {string} [errorUrl] A URL provided by the author of the + * associated application to report errors when using the application. + * @property {string} [homepage] The URL to the homepage of the associated + * application. + * @property {array} [keyCredentials] The collection of key credentials + * associated with the service principal. + * @property {string} [logoutUrl] A URL provided by the author of the + * associated application to logout + * @property {array} [oauth2Permissions] The OAuth 2.0 permissions exposed by + * the associated application. + * @property {array} [passwordCredentials] The collection of password + * credentials associated with the service principal. + * @property {string} [preferredTokenSigningKeyThumbprint] The thubmbprint of + * preferred certificate to sign the token + * @property {string} [publisherName] The publisher's name of the associated + * application + * @property {array} [replyUrls] 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. + * @property {string} [samlMetadataUrl] The URL to the SAML metadata of the + * associated application + * @property {array} [servicePrincipalNames] A collection of service + * principal names. + * @property {string} [servicePrincipalType] the type of the servie principal + * @property {array} [tags] Optional list of tags that you can apply to your + * service principals. Not nullable. */ constructor() { super(); @@ -75,9 +110,31 @@ class ServicePrincipal extends models['DirectoryObject'] { name: 'String' } }, - displayName: { + accountEnabled: { required: false, - serializedName: 'displayName', + serializedName: 'accountEnabled', + type: { + name: 'String' + } + }, + alternativeNames: { + required: false, + serializedName: 'alternativeNames', + type: { + name: 'Sequence', + element: { + required: false, + serializedName: 'StringElementType', + type: { + name: 'String' + } + } + } + }, + appDisplayName: { + required: false, + readOnly: true, + serializedName: 'appDisplayName', type: { name: 'String' } @@ -89,6 +146,21 @@ class ServicePrincipal extends models['DirectoryObject'] { name: 'String' } }, + appOwnerTenantId: { + required: false, + readOnly: true, + serializedName: 'appOwnerTenantId', + type: { + name: 'String' + } + }, + appRoleAssignmentRequired: { + required: false, + serializedName: 'appRoleAssignmentRequired', + type: { + name: 'Boolean' + } + }, appRoles: { required: false, serializedName: 'appRoles', @@ -104,6 +176,139 @@ class ServicePrincipal extends models['DirectoryObject'] { } } }, + displayName: { + required: false, + serializedName: 'displayName', + type: { + name: 'String' + } + }, + errorUrl: { + required: false, + serializedName: 'errorUrl', + type: { + name: 'String' + } + }, + homepage: { + required: false, + serializedName: 'homepage', + type: { + name: 'String' + } + }, + keyCredentials: { + required: false, + serializedName: 'keyCredentials', + type: { + name: 'Sequence', + element: { + required: false, + serializedName: 'KeyCredentialElementType', + type: { + name: 'Composite', + additionalProperties: { + type: { + name: 'Dictionary', + value: { + required: false, + serializedName: 'ObjectElementType', + type: { + name: 'Object' + } + } + } + }, + className: 'KeyCredential' + } + } + } + }, + logoutUrl: { + required: false, + serializedName: 'logoutUrl', + type: { + name: 'String' + } + }, + oauth2Permissions: { + required: false, + readOnly: true, + serializedName: 'oauth2Permissions', + type: { + name: 'Sequence', + element: { + required: false, + serializedName: 'OAuth2PermissionElementType', + type: { + name: 'Composite', + className: 'OAuth2Permission' + } + } + } + }, + passwordCredentials: { + required: false, + serializedName: 'passwordCredentials', + type: { + name: 'Sequence', + element: { + required: false, + serializedName: 'PasswordCredentialElementType', + type: { + name: 'Composite', + additionalProperties: { + type: { + name: 'Dictionary', + value: { + required: false, + serializedName: 'ObjectElementType', + type: { + name: 'Object' + } + } + } + }, + className: 'PasswordCredential' + } + } + } + }, + preferredTokenSigningKeyThumbprint: { + required: false, + serializedName: 'preferredTokenSigningKeyThumbprint', + type: { + name: 'String' + } + }, + publisherName: { + required: false, + serializedName: 'publisherName', + type: { + name: 'String' + } + }, + replyUrls: { + required: false, + serializedName: 'replyUrls', + type: { + name: 'Sequence', + element: { + required: false, + serializedName: 'StringElementType', + type: { + name: 'String' + } + } + } + }, + samlMetadataUrl: { + required: false, + serializedName: 'samlMetadataUrl', + type: { + name: 'String' + } + }, servicePrincipalNames: { required: false, serializedName: 'servicePrincipalNames', @@ -117,6 +322,27 @@ class ServicePrincipal extends models['DirectoryObject'] { } } } + }, + servicePrincipalType: { + required: false, + serializedName: 'servicePrincipalType', + type: { + name: 'String' + } + }, + tags: { + required: false, + serializedName: 'tags', + type: { + name: 'Sequence', + element: { + required: false, + serializedName: 'StringElementType', + type: { + name: 'String' + } + } + } } } } diff --git a/lib/services/graphManagement/lib/models/servicePrincipalBase.js b/lib/services/graphManagement/lib/models/servicePrincipalBase.js new file mode 100644 index 0000000000..913d74517a --- /dev/null +++ b/lib/services/graphManagement/lib/models/servicePrincipalBase.js @@ -0,0 +1,136 @@ +/* + * 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. + */ + +'use strict'; + +/** + * Active Directory service principal common perperties shared among GET, POST + * and PATCH + * + */ +class ServicePrincipalBase { + /** + * Create a ServicePrincipalBase. + * @property {array} [keyCredentials] The collection of key credentials + * associated with the service principal. + * @property {array} [passwordCredentials] The collection of password + * credentials associated with the service principal. + * @property {string} [servicePrincipalType] the type of the servie principal + * @property {string} [accountEnabled] whether or not the service principal + * account is enabled + * @property {array} [tags] Optional list of tags that you can apply to your + * service principals. Not nullable. + */ + constructor() { + } + + /** + * Defines the metadata of ServicePrincipalBase + * + * @returns {object} metadata of ServicePrincipalBase + * + */ + mapper() { + return { + required: false, + serializedName: 'ServicePrincipalBase', + type: { + name: 'Composite', + className: 'ServicePrincipalBase', + modelProperties: { + keyCredentials: { + required: false, + serializedName: 'keyCredentials', + type: { + name: 'Sequence', + element: { + required: false, + serializedName: 'KeyCredentialElementType', + type: { + name: 'Composite', + additionalProperties: { + type: { + name: 'Dictionary', + value: { + required: false, + serializedName: 'ObjectElementType', + type: { + name: 'Object' + } + } + } + }, + className: 'KeyCredential' + } + } + } + }, + passwordCredentials: { + required: false, + serializedName: 'passwordCredentials', + type: { + name: 'Sequence', + element: { + required: false, + serializedName: 'PasswordCredentialElementType', + type: { + name: 'Composite', + additionalProperties: { + type: { + name: 'Dictionary', + value: { + required: false, + serializedName: 'ObjectElementType', + type: { + name: 'Object' + } + } + } + }, + className: 'PasswordCredential' + } + } + } + }, + servicePrincipalType: { + required: false, + serializedName: 'servicePrincipalType', + type: { + name: 'String' + } + }, + accountEnabled: { + required: false, + serializedName: 'accountEnabled', + type: { + name: 'String' + } + }, + tags: { + required: false, + serializedName: 'tags', + type: { + name: 'Sequence', + element: { + required: false, + serializedName: 'StringElementType', + type: { + name: 'String' + } + } + } + } + } + } + }; + } +} + +module.exports = ServicePrincipalBase; diff --git a/lib/services/graphManagement/lib/models/servicePrincipalCreateParameters.js b/lib/services/graphManagement/lib/models/servicePrincipalCreateParameters.js index ac86b0b7d6..b4016e3034 100644 --- a/lib/services/graphManagement/lib/models/servicePrincipalCreateParameters.js +++ b/lib/services/graphManagement/lib/models/servicePrincipalCreateParameters.js @@ -10,35 +10,20 @@ 'use strict'; +const models = require('./index'); + /** * Request parameters for creating a new service principal. * + * @extends models['ServicePrincipalBase'] */ -class ServicePrincipalCreateParameters { +class ServicePrincipalCreateParameters extends models['ServicePrincipalBase'] { /** * Create a ServicePrincipalCreateParameters. - * @member {boolean} [accountEnabled] Whether the account is enabled - * @member {string} appId application Id - * @member {boolean} [appRoleAssignmentRequired] Specifies whether an - * AppRoleAssignment to a user or group is required before Azure AD will - * issue a user or access token to the application. - * @member {string} [displayName] The display name for the service principal. - * @member {string} [errorUrl] - * @member {string} [homepage] The URL to the homepage of the associated - * application. - * @member {array} [keyCredentials] A collection of KeyCredential objects. - * @member {array} [passwordCredentials] A collection of PasswordCredential - * objects - * @member {string} [publisherName] The display name of the tenant in which - * the associated application is specified. - * @member {array} [replyUrls] A collection of reply URLs for the service - * principal. - * @member {string} [samlMetadataUrl] - * @member {array} [servicePrincipalNames] A collection of service principal - * names. - * @member {array} [tags] + * @property {string} appId The application ID. */ constructor() { + super(); } /** @@ -53,62 +38,8 @@ class ServicePrincipalCreateParameters { serializedName: 'ServicePrincipalCreateParameters', type: { name: 'Composite', - additionalProperties: { - type: { - name: 'Dictionary', - value: { - required: false, - serializedName: 'ObjectElementType', - type: { - name: 'Object' - } - } - } - }, className: 'ServicePrincipalCreateParameters', modelProperties: { - accountEnabled: { - required: false, - serializedName: 'accountEnabled', - type: { - name: 'Boolean' - } - }, - appId: { - required: true, - serializedName: 'appId', - type: { - name: 'String' - } - }, - appRoleAssignmentRequired: { - required: false, - serializedName: 'appRoleAssignmentRequired', - type: { - name: 'Boolean' - } - }, - displayName: { - required: false, - serializedName: 'displayName', - type: { - name: 'String' - } - }, - errorUrl: { - required: false, - serializedName: 'errorUrl', - type: { - name: 'String' - } - }, - homepage: { - required: false, - serializedName: 'homepage', - type: { - name: 'String' - } - }, keyCredentials: { required: false, serializedName: 'keyCredentials', @@ -163,37 +94,23 @@ class ServicePrincipalCreateParameters { } } }, - publisherName: { + servicePrincipalType: { required: false, - serializedName: 'publisherName', + serializedName: 'servicePrincipalType', type: { name: 'String' } }, - replyUrls: { - required: false, - serializedName: 'replyUrls', - type: { - name: 'Sequence', - element: { - required: false, - serializedName: 'StringElementType', - type: { - name: 'String' - } - } - } - }, - samlMetadataUrl: { + accountEnabled: { required: false, - serializedName: 'samlMetadataUrl', + serializedName: 'accountEnabled', type: { name: 'String' } }, - servicePrincipalNames: { + tags: { required: false, - serializedName: 'servicePrincipalNames', + serializedName: 'tags', type: { name: 'Sequence', element: { @@ -205,18 +122,11 @@ class ServicePrincipalCreateParameters { } } }, - tags: { - required: false, - serializedName: 'tags', + appId: { + required: true, + serializedName: 'appId', type: { - name: 'Sequence', - element: { - required: false, - serializedName: 'StringElementType', - type: { - name: 'String' - } - } + name: 'String' } } } diff --git a/lib/services/graphManagement/lib/models/servicePrincipalListResult.js b/lib/services/graphManagement/lib/models/servicePrincipalListResult.js index c0f153512f..a8b374f172 100644 --- a/lib/services/graphManagement/lib/models/servicePrincipalListResult.js +++ b/lib/services/graphManagement/lib/models/servicePrincipalListResult.js @@ -16,7 +16,7 @@ class ServicePrincipalListResult extends Array { /** * Create a ServicePrincipalListResult. - * @member {string} [odatanextLink] the URL to get the next set of results. + * @property {string} [odatanextLink] the URL to get the next set of results. */ constructor() { super(); diff --git a/lib/services/graphManagement/lib/models/servicePrincipalUpdateParameters.js b/lib/services/graphManagement/lib/models/servicePrincipalUpdateParameters.js index e77c75ca62..c86f7e2d1a 100644 --- a/lib/services/graphManagement/lib/models/servicePrincipalUpdateParameters.js +++ b/lib/services/graphManagement/lib/models/servicePrincipalUpdateParameters.js @@ -10,35 +10,19 @@ 'use strict'; +const models = require('./index'); + /** - * Request parameters for creating a new service principal. + * Request parameters for update an existing service principal. * + * @extends models['ServicePrincipalBase'] */ -class ServicePrincipalUpdateParameters { +class ServicePrincipalUpdateParameters extends models['ServicePrincipalBase'] { /** * Create a ServicePrincipalUpdateParameters. - * @member {boolean} [accountEnabled] Whether the account is enabled - * @member {string} [appId] application Id - * @member {boolean} [appRoleAssignmentRequired] Specifies whether an - * AppRoleAssignment to a user or group is required before Azure AD will - * issue a user or access token to the application. - * @member {string} [displayName] The display name for the service principal. - * @member {string} [errorUrl] - * @member {string} [homepage] The URL to the homepage of the associated - * application. - * @member {array} [keyCredentials] A collection of KeyCredential objects. - * @member {array} [passwordCredentials] A collection of PasswordCredential - * objects - * @member {string} [publisherName] The display name of the tenant in which - * the associated application is specified. - * @member {array} [replyUrls] A collection of reply URLs for the service - * principal. - * @member {string} [samlMetadataUrl] - * @member {array} [servicePrincipalNames] A collection of service principal - * names. - * @member {array} [tags] */ constructor() { + super(); } /** @@ -53,62 +37,8 @@ class ServicePrincipalUpdateParameters { serializedName: 'ServicePrincipalUpdateParameters', type: { name: 'Composite', - additionalProperties: { - type: { - name: 'Dictionary', - value: { - required: false, - serializedName: 'ObjectElementType', - type: { - name: 'Object' - } - } - } - }, className: 'ServicePrincipalUpdateParameters', modelProperties: { - accountEnabled: { - required: false, - serializedName: 'accountEnabled', - type: { - name: 'Boolean' - } - }, - appId: { - required: false, - serializedName: 'appId', - type: { - name: 'String' - } - }, - appRoleAssignmentRequired: { - required: false, - serializedName: 'appRoleAssignmentRequired', - type: { - name: 'Boolean' - } - }, - displayName: { - required: false, - serializedName: 'displayName', - type: { - name: 'String' - } - }, - errorUrl: { - required: false, - serializedName: 'errorUrl', - type: { - name: 'String' - } - }, - homepage: { - required: false, - serializedName: 'homepage', - type: { - name: 'String' - } - }, keyCredentials: { required: false, serializedName: 'keyCredentials', @@ -163,48 +93,20 @@ class ServicePrincipalUpdateParameters { } } }, - publisherName: { + servicePrincipalType: { required: false, - serializedName: 'publisherName', + serializedName: 'servicePrincipalType', type: { name: 'String' } }, - replyUrls: { - required: false, - serializedName: 'replyUrls', - type: { - name: 'Sequence', - element: { - required: false, - serializedName: 'StringElementType', - type: { - name: 'String' - } - } - } - }, - samlMetadataUrl: { + accountEnabled: { required: false, - serializedName: 'samlMetadataUrl', + serializedName: 'accountEnabled', type: { name: 'String' } }, - servicePrincipalNames: { - required: false, - serializedName: 'servicePrincipalNames', - type: { - name: 'Sequence', - element: { - required: false, - serializedName: 'StringElementType', - type: { - name: 'String' - } - } - } - }, tags: { required: false, serializedName: 'tags', diff --git a/lib/services/graphManagement/lib/models/signInName.js b/lib/services/graphManagement/lib/models/signInName.js index 39f967e795..9c7fa82f7f 100644 --- a/lib/services/graphManagement/lib/models/signInName.js +++ b/lib/services/graphManagement/lib/models/signInName.js @@ -18,9 +18,9 @@ class SignInName { /** * Create a SignInName. - * @member {string} [type] A string value that can be used to classify user + * @property {string} [type] A string value that can be used to classify user * sign-in types in your directory, such as 'emailAddress' or 'userName'. - * @member {string} [value] The sign-in used by the local account. Must be + * @property {string} [value] The sign-in used by the local account. Must be * unique across the company/tenant. For example, 'johnc@example.com'. */ constructor() { diff --git a/lib/services/graphManagement/lib/models/user.js b/lib/services/graphManagement/lib/models/user.js index 600108e146..80779764be 100644 --- a/lib/services/graphManagement/lib/models/user.js +++ b/lib/services/graphManagement/lib/models/user.js @@ -20,25 +20,26 @@ const models = require('./index'); class User extends models['DirectoryObject'] { /** * Create a User. - * @member {string} [immutableId] This must be specified if you are using a + * @property {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 * Directory user account with their Azure AD user object. - * @member {string} [usageLocation] A two letter country code (ISO standard + * @property {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 * include: "US", "JP", and "GB". - * @member {string} [givenName] The given name for the user. - * @member {string} [surname] The user's surname (family name or last name). - * @member {string} [userType] A string value that can be used to classify + * @property {string} [givenName] The given name for the user. + * @property {string} [surname] The user's surname (family name or last + * name). + * @property {string} [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' - * @member {boolean} [accountEnabled] Whether the account is enabled. - * @member {string} [displayName] The display name of the user. - * @member {string} [userPrincipalName] The principal name of the user. - * @member {string} [mailNickname] The mail alias for the user. - * @member {string} [mail] The primary email address of the user. - * @member {array} [signInNames] The sign-in names of the user. + * @property {boolean} [accountEnabled] Whether the account is enabled. + * @property {string} [displayName] The display name of the user. + * @property {string} [userPrincipalName] The principal name of the user. + * @property {string} [mailNickname] The mail alias for the user. + * @property {string} [mail] The primary email address of the user. + * @property {array} [signInNames] The sign-in names of the user. */ constructor() { super(); diff --git a/lib/services/graphManagement/lib/models/userBase.js b/lib/services/graphManagement/lib/models/userBase.js index c50f11342d..7a831cc859 100644 --- a/lib/services/graphManagement/lib/models/userBase.js +++ b/lib/services/graphManagement/lib/models/userBase.js @@ -16,17 +16,18 @@ class UserBase { /** * Create a UserBase. - * @member {string} [immutableId] This must be specified if you are using a + * @property {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 * Directory user account with their Azure AD user object. - * @member {string} [usageLocation] A two letter country code (ISO standard + * @property {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 * include: "US", "JP", and "GB". - * @member {string} [givenName] The given name for the user. - * @member {string} [surname] The user's surname (family name or last name). - * @member {string} [userType] A string value that can be used to classify + * @property {string} [givenName] The given name for the user. + * @property {string} [surname] The user's surname (family name or last + * name). + * @property {string} [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' */ diff --git a/lib/services/graphManagement/lib/models/userCreateParameters.js b/lib/services/graphManagement/lib/models/userCreateParameters.js index 7680e2ae42..5ea2cb3f20 100644 --- a/lib/services/graphManagement/lib/models/userCreateParameters.js +++ b/lib/services/graphManagement/lib/models/userCreateParameters.js @@ -20,17 +20,17 @@ const models = require('./index'); class UserCreateParameters extends models['UserBase'] { /** * Create a UserCreateParameters. - * @member {boolean} accountEnabled Whether the account is enabled. - * @member {string} displayName The display name of the user. - * @member {object} passwordProfile Password Profile - * @member {string} [passwordProfile.password] Password - * @member {boolean} [passwordProfile.forceChangePasswordNextLogin] Whether + * @property {boolean} accountEnabled Whether the account is enabled. + * @property {string} displayName The display name of the user. + * @property {object} passwordProfile Password Profile + * @property {string} [passwordProfile.password] Password + * @property {boolean} [passwordProfile.forceChangePasswordNextLogin] Whether * to force a password change on next login. - * @member {string} userPrincipalName The user principal name + * @property {string} userPrincipalName The user principal name * (someuser@contoso.com). It must contain one of the verified domains for * the tenant. - * @member {string} mailNickname The mail alias for the user. - * @member {string} [mail] The primary email address of the user. + * @property {string} mailNickname The mail alias for the user. + * @property {string} [mail] The primary email address of the user. */ constructor() { super(); diff --git a/lib/services/graphManagement/lib/models/userGetMemberGroupsParameters.js b/lib/services/graphManagement/lib/models/userGetMemberGroupsParameters.js index 5ba64e6efa..524a8faa47 100644 --- a/lib/services/graphManagement/lib/models/userGetMemberGroupsParameters.js +++ b/lib/services/graphManagement/lib/models/userGetMemberGroupsParameters.js @@ -17,7 +17,7 @@ class UserGetMemberGroupsParameters { /** * Create a UserGetMemberGroupsParameters. - * @member {boolean} securityEnabledOnly If true, only membership in + * @property {boolean} securityEnabledOnly If true, only membership in * security-enabled groups should be checked. Otherwise, membership in all * groups should be checked. */ diff --git a/lib/services/graphManagement/lib/models/userListResult.js b/lib/services/graphManagement/lib/models/userListResult.js index 9c4465bb9c..f8419fa94a 100644 --- a/lib/services/graphManagement/lib/models/userListResult.js +++ b/lib/services/graphManagement/lib/models/userListResult.js @@ -16,7 +16,7 @@ class UserListResult extends Array { /** * Create a UserListResult. - * @member {string} [odatanextLink] The URL to get the next set of results. + * @property {string} [odatanextLink] The URL to get the next set of results. */ constructor() { super(); diff --git a/lib/services/graphManagement/lib/models/userUpdateParameters.js b/lib/services/graphManagement/lib/models/userUpdateParameters.js index 5c99c86054..7fc9c5df0f 100644 --- a/lib/services/graphManagement/lib/models/userUpdateParameters.js +++ b/lib/services/graphManagement/lib/models/userUpdateParameters.js @@ -20,16 +20,16 @@ const models = require('./index'); class UserUpdateParameters extends models['UserBase'] { /** * Create a UserUpdateParameters. - * @member {boolean} [accountEnabled] Whether the account is enabled. - * @member {string} [displayName] The display name of the user. - * @member {object} [passwordProfile] The password profile of the user. - * @member {string} [passwordProfile.password] Password - * @member {boolean} [passwordProfile.forceChangePasswordNextLogin] Whether + * @property {boolean} [accountEnabled] Whether the account is enabled. + * @property {string} [displayName] The display name of the user. + * @property {object} [passwordProfile] The password profile of the user. + * @property {string} [passwordProfile.password] Password + * @property {boolean} [passwordProfile.forceChangePasswordNextLogin] Whether * to force a password change on next login. - * @member {string} [userPrincipalName] The user principal name + * @property {string} [userPrincipalName] The user principal name * (someuser@contoso.com). It must contain one of the verified domains for * the tenant. - * @member {string} [mailNickname] The mail alias for the user. + * @property {string} [mailNickname] The mail alias for the user. */ constructor() { super(); diff --git a/lib/services/graphManagement/lib/operations/applications.js b/lib/services/graphManagement/lib/operations/applications.js index a12af2d89c..3ea8876796 100644 --- a/lib/services/graphManagement/lib/operations/applications.js +++ b/lib/services/graphManagement/lib/operations/applications.js @@ -19,37 +19,126 @@ const WebResource = msRest.WebResource; * * @param {object} parameters The parameters for creating an application. * + * @param {boolean} [parameters.allowGuestsSignIn] A property on the + * application to indicate if the application accepts other IDPs or not or + * partially accepts. + * + * @param {boolean} [parameters.allowPassthroughUsers] Indicates that the + * application supports pass through users who have no presence in the resource + * tenant. + * + * @param {string} [parameters.appLogoUrl] The url for the application logo + * image stored in a CDN. + * * @param {array} [parameters.appRoles] The collection of application roles * that an application may declare. These roles can be assigned to users, * groups or service principals. * - * @param {boolean} parameters.availableToOtherTenants Whether the application - * is available to other tenants. + * @param {array} [parameters.appPermissions] The application permissions. * - * @param {string} parameters.displayName The display name of the application. + * @param {boolean} [parameters.availableToOtherTenants] Whether the + * application is available to other tenants. + * + * @param {string} [parameters.displayName] The display name of the + * application. + * + * @param {string} [parameters.errorUrl] A URL provided by the author of the + * application to report errors when using the application. * * @param {string} [parameters.homepage] The home page of the application. * - * @param {array} parameters.identifierUris A collection of URIs for the + * @param {array} [parameters.identifierUris] A collection of URIs for the * application. * - * @param {array} [parameters.replyUrls] A collection of reply URLs for the - * application. + * @param {object} [parameters.informationalUrls] urls with more informations + * of the application. + * + * @param {string} [parameters.informationalUrls.termsOfService] The terms of + * service URI + * + * @param {string} [parameters.informationalUrls.marketing] The marketing URI * - * @param {array} [parameters.keyCredentials] The list of KeyCredential + * @param {string} [parameters.informationalUrls.privacy] The privacy policy + * URI + * + * @param {string} [parameters.informationalUrls.support] The support URI + * + * @param {boolean} [parameters.isDeviceOnlyAuthSupported] Specifies whether + * this application supports device authentication without a user. The default + * is false. + * + * @param {array} [parameters.keyCredentials] A collection of KeyCredential * objects. * - * @param {array} [parameters.passwordCredentials] The list of - * PasswordCredential objects. + * @param {array} [parameters.knownClientApplications] 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). + * + * @param {string} [parameters.logoutUrl] the url of the logout page * * @param {boolean} [parameters.oauth2AllowImplicitFlow] Whether to allow * implicit grant flow for OAuth2 * + * @param {boolean} [parameters.oauth2AllowUrlPathMatching] 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. + * + * @param {array} [parameters.oauth2Permissions] 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. + * + * @param {boolean} [parameters.oauth2RequirePostResponse] 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. + * + * @param {array} [parameters.orgRestrictions] A list of tenants allowed to + * access application. + * + * @param {object} [parameters.optionalClaims] + * + * @param {array} [parameters.optionalClaims.idToken] Optional claims requested + * to be included in the id token. + * + * @param {array} [parameters.optionalClaims.accessToken] Optional claims + * requested to be included in the access token. + * + * @param {array} [parameters.optionalClaims.samlToken] Optional claims + * requested to be included in the saml token. + * + * @param {array} [parameters.passwordCredentials] A collection of + * PasswordCredential objects + * + * @param {array} [parameters.preAuthorizedApplications] list of + * pre-authorizaed applications. + * + * @param {boolean} [parameters.publicClient] Specifies whether this + * application is a public client (such as an installed application running on + * a mobile device). Default is false. + * + * @param {string} [parameters.publisherDomain] Reliable domain which can be + * used to identify an application. + * + * @param {array} [parameters.replyUrls] A collection of reply URLs for the + * application. + * * @param {array} [parameters.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. * + * @param {string} [parameters.samlMetadataUrl] The URL to the SAML metadata + * for the application. + * + * @param {string} [parameters.signInAudience] Audience for signing in to the + * application (AzureADMyOrganizatio, AzureADAllorganizations, + * AzureADAndMicrosofAccounts). + * + * @param {string} [parameters.wwwHomepage] The primary Web page. + * * @param {object} [options] Optional Parameters. * * @param {object} [options.customHeaders] Headers that will be added to the @@ -80,9 +169,6 @@ function _create(parameters, options, callback) { } // Validate try { - if (parameters === null || parameters === undefined) { - throw new Error('parameters cannot be null or undefined.'); - } if (this.client.apiVersion === null || this.client.apiVersion === undefined || typeof this.client.apiVersion.valueOf() !== 'string') { throw new Error('this.client.apiVersion cannot be null or undefined and it must be of type string.'); } @@ -610,38 +696,126 @@ function _get(applicationObjectId, options, callback) { * * @param {object} parameters Parameters to update an existing application. * + * @param {boolean} [parameters.allowGuestsSignIn] A property on the + * application to indicate if the application accepts other IDPs or not or + * partially accepts. + * + * @param {boolean} [parameters.allowPassthroughUsers] Indicates that the + * application supports pass through users who have no presence in the resource + * tenant. + * + * @param {string} [parameters.appLogoUrl] The url for the application logo + * image stored in a CDN. + * * @param {array} [parameters.appRoles] The collection of application roles * that an application may declare. These roles can be assigned to users, * groups or service principals. * + * @param {array} [parameters.appPermissions] The application permissions. + * * @param {boolean} [parameters.availableToOtherTenants] Whether the - * application is available to other tenants + * application is available to other tenants. * * @param {string} [parameters.displayName] The display name of the * application. * + * @param {string} [parameters.errorUrl] A URL provided by the author of the + * application to report errors when using the application. + * * @param {string} [parameters.homepage] The home page of the application. * * @param {array} [parameters.identifierUris] A collection of URIs for the * application. * - * @param {array} [parameters.replyUrls] A collection of reply URLs for the - * application. + * @param {object} [parameters.informationalUrls] urls with more informations + * of the application. * - * @param {array} [parameters.keyCredentials] The list of KeyCredential + * @param {string} [parameters.informationalUrls.termsOfService] The terms of + * service URI + * + * @param {string} [parameters.informationalUrls.marketing] The marketing URI + * + * @param {string} [parameters.informationalUrls.privacy] The privacy policy + * URI + * + * @param {string} [parameters.informationalUrls.support] The support URI + * + * @param {boolean} [parameters.isDeviceOnlyAuthSupported] Specifies whether + * this application supports device authentication without a user. The default + * is false. + * + * @param {array} [parameters.keyCredentials] A collection of KeyCredential * objects. * - * @param {array} [parameters.passwordCredentials] The list of - * PasswordCredential objects. + * @param {array} [parameters.knownClientApplications] 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). + * + * @param {string} [parameters.logoutUrl] the url of the logout page * * @param {boolean} [parameters.oauth2AllowImplicitFlow] Whether to allow * implicit grant flow for OAuth2 * + * @param {boolean} [parameters.oauth2AllowUrlPathMatching] 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. + * + * @param {array} [parameters.oauth2Permissions] 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. + * + * @param {boolean} [parameters.oauth2RequirePostResponse] 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. + * + * @param {array} [parameters.orgRestrictions] A list of tenants allowed to + * access application. + * + * @param {object} [parameters.optionalClaims] + * + * @param {array} [parameters.optionalClaims.idToken] Optional claims requested + * to be included in the id token. + * + * @param {array} [parameters.optionalClaims.accessToken] Optional claims + * requested to be included in the access token. + * + * @param {array} [parameters.optionalClaims.samlToken] Optional claims + * requested to be included in the saml token. + * + * @param {array} [parameters.passwordCredentials] A collection of + * PasswordCredential objects + * + * @param {array} [parameters.preAuthorizedApplications] list of + * pre-authorizaed applications. + * + * @param {boolean} [parameters.publicClient] Specifies whether this + * application is a public client (such as an installed application running on + * a mobile device). Default is false. + * + * @param {string} [parameters.publisherDomain] Reliable domain which can be + * used to identify an application. + * + * @param {array} [parameters.replyUrls] A collection of reply URLs for the + * application. + * * @param {array} [parameters.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. * + * @param {string} [parameters.samlMetadataUrl] The URL to the SAML metadata + * for the application. + * + * @param {string} [parameters.signInAudience] Audience for signing in to the + * application (AzureADMyOrganizatio, AzureADAllorganizations, + * AzureADAndMicrosofAccounts). + * + * @param {string} [parameters.wwwHomepage] The primary Web page. + * * @param {object} [options] Optional Parameters. * * @param {object} [options.customHeaders] Headers that will be added to the @@ -2068,37 +2242,126 @@ class Applications { * * @param {object} parameters The parameters for creating an application. * + * @param {boolean} [parameters.allowGuestsSignIn] A property on the + * application to indicate if the application accepts other IDPs or not or + * partially accepts. + * + * @param {boolean} [parameters.allowPassthroughUsers] Indicates that the + * application supports pass through users who have no presence in the resource + * tenant. + * + * @param {string} [parameters.appLogoUrl] The url for the application logo + * image stored in a CDN. + * * @param {array} [parameters.appRoles] The collection of application roles * that an application may declare. These roles can be assigned to users, * groups or service principals. * - * @param {boolean} parameters.availableToOtherTenants Whether the application - * is available to other tenants. + * @param {array} [parameters.appPermissions] The application permissions. + * + * @param {boolean} [parameters.availableToOtherTenants] Whether the + * application is available to other tenants. + * + * @param {string} [parameters.displayName] The display name of the + * application. * - * @param {string} parameters.displayName The display name of the application. + * @param {string} [parameters.errorUrl] A URL provided by the author of the + * application to report errors when using the application. * * @param {string} [parameters.homepage] The home page of the application. * - * @param {array} parameters.identifierUris A collection of URIs for the + * @param {array} [parameters.identifierUris] A collection of URIs for the * application. * - * @param {array} [parameters.replyUrls] A collection of reply URLs for the - * application. + * @param {object} [parameters.informationalUrls] urls with more informations + * of the application. + * + * @param {string} [parameters.informationalUrls.termsOfService] The terms of + * service URI + * + * @param {string} [parameters.informationalUrls.marketing] The marketing URI + * + * @param {string} [parameters.informationalUrls.privacy] The privacy policy + * URI * - * @param {array} [parameters.keyCredentials] The list of KeyCredential + * @param {string} [parameters.informationalUrls.support] The support URI + * + * @param {boolean} [parameters.isDeviceOnlyAuthSupported] Specifies whether + * this application supports device authentication without a user. The default + * is false. + * + * @param {array} [parameters.keyCredentials] A collection of KeyCredential * objects. * - * @param {array} [parameters.passwordCredentials] The list of - * PasswordCredential objects. + * @param {array} [parameters.knownClientApplications] 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). + * + * @param {string} [parameters.logoutUrl] the url of the logout page * * @param {boolean} [parameters.oauth2AllowImplicitFlow] Whether to allow * implicit grant flow for OAuth2 * + * @param {boolean} [parameters.oauth2AllowUrlPathMatching] 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. + * + * @param {array} [parameters.oauth2Permissions] 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. + * + * @param {boolean} [parameters.oauth2RequirePostResponse] 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. + * + * @param {array} [parameters.orgRestrictions] A list of tenants allowed to + * access application. + * + * @param {object} [parameters.optionalClaims] + * + * @param {array} [parameters.optionalClaims.idToken] Optional claims requested + * to be included in the id token. + * + * @param {array} [parameters.optionalClaims.accessToken] Optional claims + * requested to be included in the access token. + * + * @param {array} [parameters.optionalClaims.samlToken] Optional claims + * requested to be included in the saml token. + * + * @param {array} [parameters.passwordCredentials] A collection of + * PasswordCredential objects + * + * @param {array} [parameters.preAuthorizedApplications] list of + * pre-authorizaed applications. + * + * @param {boolean} [parameters.publicClient] Specifies whether this + * application is a public client (such as an installed application running on + * a mobile device). Default is false. + * + * @param {string} [parameters.publisherDomain] Reliable domain which can be + * used to identify an application. + * + * @param {array} [parameters.replyUrls] A collection of reply URLs for the + * application. + * * @param {array} [parameters.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. * + * @param {string} [parameters.samlMetadataUrl] The URL to the SAML metadata + * for the application. + * + * @param {string} [parameters.signInAudience] Audience for signing in to the + * application (AzureADMyOrganizatio, AzureADAllorganizations, + * AzureADAndMicrosofAccounts). + * + * @param {string} [parameters.wwwHomepage] The primary Web page. + * * @param {object} [options] Optional Parameters. * * @param {object} [options.customHeaders] Headers that will be added to the @@ -2129,37 +2392,126 @@ class Applications { * * @param {object} parameters The parameters for creating an application. * + * @param {boolean} [parameters.allowGuestsSignIn] A property on the + * application to indicate if the application accepts other IDPs or not or + * partially accepts. + * + * @param {boolean} [parameters.allowPassthroughUsers] Indicates that the + * application supports pass through users who have no presence in the resource + * tenant. + * + * @param {string} [parameters.appLogoUrl] The url for the application logo + * image stored in a CDN. + * * @param {array} [parameters.appRoles] The collection of application roles * that an application may declare. These roles can be assigned to users, * groups or service principals. * - * @param {boolean} parameters.availableToOtherTenants Whether the application - * is available to other tenants. + * @param {array} [parameters.appPermissions] The application permissions. * - * @param {string} parameters.displayName The display name of the application. + * @param {boolean} [parameters.availableToOtherTenants] Whether the + * application is available to other tenants. + * + * @param {string} [parameters.displayName] The display name of the + * application. + * + * @param {string} [parameters.errorUrl] A URL provided by the author of the + * application to report errors when using the application. * * @param {string} [parameters.homepage] The home page of the application. * - * @param {array} parameters.identifierUris A collection of URIs for the + * @param {array} [parameters.identifierUris] A collection of URIs for the * application. * - * @param {array} [parameters.replyUrls] A collection of reply URLs for the - * application. + * @param {object} [parameters.informationalUrls] urls with more informations + * of the application. + * + * @param {string} [parameters.informationalUrls.termsOfService] The terms of + * service URI + * + * @param {string} [parameters.informationalUrls.marketing] The marketing URI + * + * @param {string} [parameters.informationalUrls.privacy] The privacy policy + * URI + * + * @param {string} [parameters.informationalUrls.support] The support URI + * + * @param {boolean} [parameters.isDeviceOnlyAuthSupported] Specifies whether + * this application supports device authentication without a user. The default + * is false. * - * @param {array} [parameters.keyCredentials] The list of KeyCredential + * @param {array} [parameters.keyCredentials] A collection of KeyCredential * objects. * - * @param {array} [parameters.passwordCredentials] The list of - * PasswordCredential objects. + * @param {array} [parameters.knownClientApplications] 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). + * + * @param {string} [parameters.logoutUrl] the url of the logout page * * @param {boolean} [parameters.oauth2AllowImplicitFlow] Whether to allow * implicit grant flow for OAuth2 * + * @param {boolean} [parameters.oauth2AllowUrlPathMatching] 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. + * + * @param {array} [parameters.oauth2Permissions] 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. + * + * @param {boolean} [parameters.oauth2RequirePostResponse] 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. + * + * @param {array} [parameters.orgRestrictions] A list of tenants allowed to + * access application. + * + * @param {object} [parameters.optionalClaims] + * + * @param {array} [parameters.optionalClaims.idToken] Optional claims requested + * to be included in the id token. + * + * @param {array} [parameters.optionalClaims.accessToken] Optional claims + * requested to be included in the access token. + * + * @param {array} [parameters.optionalClaims.samlToken] Optional claims + * requested to be included in the saml token. + * + * @param {array} [parameters.passwordCredentials] A collection of + * PasswordCredential objects + * + * @param {array} [parameters.preAuthorizedApplications] list of + * pre-authorizaed applications. + * + * @param {boolean} [parameters.publicClient] Specifies whether this + * application is a public client (such as an installed application running on + * a mobile device). Default is false. + * + * @param {string} [parameters.publisherDomain] Reliable domain which can be + * used to identify an application. + * + * @param {array} [parameters.replyUrls] A collection of reply URLs for the + * application. + * * @param {array} [parameters.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. * + * @param {string} [parameters.samlMetadataUrl] The URL to the SAML metadata + * for the application. + * + * @param {string} [parameters.signInAudience] Audience for signing in to the + * application (AzureADMyOrganizatio, AzureADAllorganizations, + * AzureADAndMicrosofAccounts). + * + * @param {string} [parameters.wwwHomepage] The primary Web page. + * * @param {object} [options] Optional Parameters. * * @param {object} [options.customHeaders] Headers that will be added to the @@ -2459,38 +2811,126 @@ class Applications { * * @param {object} parameters Parameters to update an existing application. * + * @param {boolean} [parameters.allowGuestsSignIn] A property on the + * application to indicate if the application accepts other IDPs or not or + * partially accepts. + * + * @param {boolean} [parameters.allowPassthroughUsers] Indicates that the + * application supports pass through users who have no presence in the resource + * tenant. + * + * @param {string} [parameters.appLogoUrl] The url for the application logo + * image stored in a CDN. + * * @param {array} [parameters.appRoles] The collection of application roles * that an application may declare. These roles can be assigned to users, * groups or service principals. * + * @param {array} [parameters.appPermissions] The application permissions. + * * @param {boolean} [parameters.availableToOtherTenants] Whether the - * application is available to other tenants + * application is available to other tenants. * * @param {string} [parameters.displayName] The display name of the * application. * + * @param {string} [parameters.errorUrl] A URL provided by the author of the + * application to report errors when using the application. + * * @param {string} [parameters.homepage] The home page of the application. * * @param {array} [parameters.identifierUris] A collection of URIs for the * application. * - * @param {array} [parameters.replyUrls] A collection of reply URLs for the - * application. + * @param {object} [parameters.informationalUrls] urls with more informations + * of the application. + * + * @param {string} [parameters.informationalUrls.termsOfService] The terms of + * service URI + * + * @param {string} [parameters.informationalUrls.marketing] The marketing URI + * + * @param {string} [parameters.informationalUrls.privacy] The privacy policy + * URI + * + * @param {string} [parameters.informationalUrls.support] The support URI + * + * @param {boolean} [parameters.isDeviceOnlyAuthSupported] Specifies whether + * this application supports device authentication without a user. The default + * is false. * - * @param {array} [parameters.keyCredentials] The list of KeyCredential + * @param {array} [parameters.keyCredentials] A collection of KeyCredential * objects. * - * @param {array} [parameters.passwordCredentials] The list of - * PasswordCredential objects. + * @param {array} [parameters.knownClientApplications] 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). + * + * @param {string} [parameters.logoutUrl] the url of the logout page * * @param {boolean} [parameters.oauth2AllowImplicitFlow] Whether to allow * implicit grant flow for OAuth2 * + * @param {boolean} [parameters.oauth2AllowUrlPathMatching] 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. + * + * @param {array} [parameters.oauth2Permissions] 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. + * + * @param {boolean} [parameters.oauth2RequirePostResponse] 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. + * + * @param {array} [parameters.orgRestrictions] A list of tenants allowed to + * access application. + * + * @param {object} [parameters.optionalClaims] + * + * @param {array} [parameters.optionalClaims.idToken] Optional claims requested + * to be included in the id token. + * + * @param {array} [parameters.optionalClaims.accessToken] Optional claims + * requested to be included in the access token. + * + * @param {array} [parameters.optionalClaims.samlToken] Optional claims + * requested to be included in the saml token. + * + * @param {array} [parameters.passwordCredentials] A collection of + * PasswordCredential objects + * + * @param {array} [parameters.preAuthorizedApplications] list of + * pre-authorizaed applications. + * + * @param {boolean} [parameters.publicClient] Specifies whether this + * application is a public client (such as an installed application running on + * a mobile device). Default is false. + * + * @param {string} [parameters.publisherDomain] Reliable domain which can be + * used to identify an application. + * + * @param {array} [parameters.replyUrls] A collection of reply URLs for the + * application. + * * @param {array} [parameters.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. * + * @param {string} [parameters.samlMetadataUrl] The URL to the SAML metadata + * for the application. + * + * @param {string} [parameters.signInAudience] Audience for signing in to the + * application (AzureADMyOrganizatio, AzureADAllorganizations, + * AzureADAndMicrosofAccounts). + * + * @param {string} [parameters.wwwHomepage] The primary Web page. + * * @param {object} [options] Optional Parameters. * * @param {object} [options.customHeaders] Headers that will be added to the @@ -2523,38 +2963,126 @@ class Applications { * * @param {object} parameters Parameters to update an existing application. * + * @param {boolean} [parameters.allowGuestsSignIn] A property on the + * application to indicate if the application accepts other IDPs or not or + * partially accepts. + * + * @param {boolean} [parameters.allowPassthroughUsers] Indicates that the + * application supports pass through users who have no presence in the resource + * tenant. + * + * @param {string} [parameters.appLogoUrl] The url for the application logo + * image stored in a CDN. + * * @param {array} [parameters.appRoles] The collection of application roles * that an application may declare. These roles can be assigned to users, * groups or service principals. * + * @param {array} [parameters.appPermissions] The application permissions. + * * @param {boolean} [parameters.availableToOtherTenants] Whether the - * application is available to other tenants + * application is available to other tenants. * * @param {string} [parameters.displayName] The display name of the * application. * + * @param {string} [parameters.errorUrl] A URL provided by the author of the + * application to report errors when using the application. + * * @param {string} [parameters.homepage] The home page of the application. * * @param {array} [parameters.identifierUris] A collection of URIs for the * application. * - * @param {array} [parameters.replyUrls] A collection of reply URLs for the - * application. + * @param {object} [parameters.informationalUrls] urls with more informations + * of the application. + * + * @param {string} [parameters.informationalUrls.termsOfService] The terms of + * service URI + * + * @param {string} [parameters.informationalUrls.marketing] The marketing URI + * + * @param {string} [parameters.informationalUrls.privacy] The privacy policy + * URI * - * @param {array} [parameters.keyCredentials] The list of KeyCredential + * @param {string} [parameters.informationalUrls.support] The support URI + * + * @param {boolean} [parameters.isDeviceOnlyAuthSupported] Specifies whether + * this application supports device authentication without a user. The default + * is false. + * + * @param {array} [parameters.keyCredentials] A collection of KeyCredential * objects. * - * @param {array} [parameters.passwordCredentials] The list of - * PasswordCredential objects. + * @param {array} [parameters.knownClientApplications] 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). + * + * @param {string} [parameters.logoutUrl] the url of the logout page * * @param {boolean} [parameters.oauth2AllowImplicitFlow] Whether to allow * implicit grant flow for OAuth2 * + * @param {boolean} [parameters.oauth2AllowUrlPathMatching] 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. + * + * @param {array} [parameters.oauth2Permissions] 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. + * + * @param {boolean} [parameters.oauth2RequirePostResponse] 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. + * + * @param {array} [parameters.orgRestrictions] A list of tenants allowed to + * access application. + * + * @param {object} [parameters.optionalClaims] + * + * @param {array} [parameters.optionalClaims.idToken] Optional claims requested + * to be included in the id token. + * + * @param {array} [parameters.optionalClaims.accessToken] Optional claims + * requested to be included in the access token. + * + * @param {array} [parameters.optionalClaims.samlToken] Optional claims + * requested to be included in the saml token. + * + * @param {array} [parameters.passwordCredentials] A collection of + * PasswordCredential objects + * + * @param {array} [parameters.preAuthorizedApplications] list of + * pre-authorizaed applications. + * + * @param {boolean} [parameters.publicClient] Specifies whether this + * application is a public client (such as an installed application running on + * a mobile device). Default is false. + * + * @param {string} [parameters.publisherDomain] Reliable domain which can be + * used to identify an application. + * + * @param {array} [parameters.replyUrls] A collection of reply URLs for the + * application. + * * @param {array} [parameters.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. * + * @param {string} [parameters.samlMetadataUrl] The URL to the SAML metadata + * for the application. + * + * @param {string} [parameters.signInAudience] Audience for signing in to the + * application (AzureADMyOrganizatio, AzureADAllorganizations, + * AzureADAndMicrosofAccounts). + * + * @param {string} [parameters.wwwHomepage] The primary Web page. + * * @param {object} [options] Optional Parameters. * * @param {object} [options.customHeaders] Headers that will be added to the diff --git a/lib/services/graphManagement/lib/operations/index.d.ts b/lib/services/graphManagement/lib/operations/index.d.ts index 6c07de1e44..16a125ca9a 100644 --- a/lib/services/graphManagement/lib/operations/index.d.ts +++ b/lib/services/graphManagement/lib/operations/index.d.ts @@ -194,37 +194,126 @@ export interface Applications { * * @param {object} parameters The parameters for creating an application. * + * @param {boolean} [parameters.allowGuestsSignIn] A property on the + * application to indicate if the application accepts other IDPs or not or + * partially accepts. + * + * @param {boolean} [parameters.allowPassthroughUsers] Indicates that the + * application supports pass through users who have no presence in the resource + * tenant. + * + * @param {string} [parameters.appLogoUrl] The url for the application logo + * image stored in a CDN. + * * @param {array} [parameters.appRoles] The collection of application roles * that an application may declare. These roles can be assigned to users, * groups or service principals. * - * @param {boolean} parameters.availableToOtherTenants Whether the application - * is available to other tenants. + * @param {array} [parameters.appPermissions] The application permissions. + * + * @param {boolean} [parameters.availableToOtherTenants] Whether the + * application is available to other tenants. * - * @param {string} parameters.displayName The display name of the application. + * @param {string} [parameters.displayName] The display name of the + * application. + * + * @param {string} [parameters.errorUrl] A URL provided by the author of the + * application to report errors when using the application. * * @param {string} [parameters.homepage] The home page of the application. * - * @param {array} parameters.identifierUris A collection of URIs for the + * @param {array} [parameters.identifierUris] A collection of URIs for the * application. * - * @param {array} [parameters.replyUrls] A collection of reply URLs for the - * application. + * @param {object} [parameters.informationalUrls] urls with more informations + * of the application. + * + * @param {string} [parameters.informationalUrls.termsOfService] The terms of + * service URI + * + * @param {string} [parameters.informationalUrls.marketing] The marketing URI + * + * @param {string} [parameters.informationalUrls.privacy] The privacy policy + * URI * - * @param {array} [parameters.keyCredentials] The list of KeyCredential + * @param {string} [parameters.informationalUrls.support] The support URI + * + * @param {boolean} [parameters.isDeviceOnlyAuthSupported] Specifies whether + * this application supports device authentication without a user. The default + * is false. + * + * @param {array} [parameters.keyCredentials] A collection of KeyCredential * objects. * - * @param {array} [parameters.passwordCredentials] The list of - * PasswordCredential objects. + * @param {array} [parameters.knownClientApplications] 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). + * + * @param {string} [parameters.logoutUrl] the url of the logout page * * @param {boolean} [parameters.oauth2AllowImplicitFlow] Whether to allow * implicit grant flow for OAuth2 * + * @param {boolean} [parameters.oauth2AllowUrlPathMatching] 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. + * + * @param {array} [parameters.oauth2Permissions] 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. + * + * @param {boolean} [parameters.oauth2RequirePostResponse] 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. + * + * @param {array} [parameters.orgRestrictions] A list of tenants allowed to + * access application. + * + * @param {object} [parameters.optionalClaims] + * + * @param {array} [parameters.optionalClaims.idToken] Optional claims requested + * to be included in the id token. + * + * @param {array} [parameters.optionalClaims.accessToken] Optional claims + * requested to be included in the access token. + * + * @param {array} [parameters.optionalClaims.samlToken] Optional claims + * requested to be included in the saml token. + * + * @param {array} [parameters.passwordCredentials] A collection of + * PasswordCredential objects + * + * @param {array} [parameters.preAuthorizedApplications] list of + * pre-authorizaed applications. + * + * @param {boolean} [parameters.publicClient] Specifies whether this + * application is a public client (such as an installed application running on + * a mobile device). Default is false. + * + * @param {string} [parameters.publisherDomain] Reliable domain which can be + * used to identify an application. + * + * @param {array} [parameters.replyUrls] A collection of reply URLs for the + * application. + * * @param {array} [parameters.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. * + * @param {string} [parameters.samlMetadataUrl] The URL to the SAML metadata + * for the application. + * + * @param {string} [parameters.signInAudience] Audience for signing in to the + * application (AzureADMyOrganizatio, AzureADAllorganizations, + * AzureADAndMicrosofAccounts). + * + * @param {string} [parameters.wwwHomepage] The primary Web page. + * * @param {object} [options] Optional Parameters. * * @param {object} [options.customHeaders] Headers that will be added to the @@ -243,37 +332,126 @@ export interface Applications { * * @param {object} parameters The parameters for creating an application. * + * @param {boolean} [parameters.allowGuestsSignIn] A property on the + * application to indicate if the application accepts other IDPs or not or + * partially accepts. + * + * @param {boolean} [parameters.allowPassthroughUsers] Indicates that the + * application supports pass through users who have no presence in the resource + * tenant. + * + * @param {string} [parameters.appLogoUrl] The url for the application logo + * image stored in a CDN. + * * @param {array} [parameters.appRoles] The collection of application roles * that an application may declare. These roles can be assigned to users, * groups or service principals. * - * @param {boolean} parameters.availableToOtherTenants Whether the application - * is available to other tenants. + * @param {array} [parameters.appPermissions] The application permissions. + * + * @param {boolean} [parameters.availableToOtherTenants] Whether the + * application is available to other tenants. + * + * @param {string} [parameters.displayName] The display name of the + * application. * - * @param {string} parameters.displayName The display name of the application. + * @param {string} [parameters.errorUrl] A URL provided by the author of the + * application to report errors when using the application. * * @param {string} [parameters.homepage] The home page of the application. * - * @param {array} parameters.identifierUris A collection of URIs for the + * @param {array} [parameters.identifierUris] A collection of URIs for the * application. * - * @param {array} [parameters.replyUrls] A collection of reply URLs for the - * application. + * @param {object} [parameters.informationalUrls] urls with more informations + * of the application. + * + * @param {string} [parameters.informationalUrls.termsOfService] The terms of + * service URI + * + * @param {string} [parameters.informationalUrls.marketing] The marketing URI * - * @param {array} [parameters.keyCredentials] The list of KeyCredential + * @param {string} [parameters.informationalUrls.privacy] The privacy policy + * URI + * + * @param {string} [parameters.informationalUrls.support] The support URI + * + * @param {boolean} [parameters.isDeviceOnlyAuthSupported] Specifies whether + * this application supports device authentication without a user. The default + * is false. + * + * @param {array} [parameters.keyCredentials] A collection of KeyCredential * objects. * - * @param {array} [parameters.passwordCredentials] The list of - * PasswordCredential objects. + * @param {array} [parameters.knownClientApplications] 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). + * + * @param {string} [parameters.logoutUrl] the url of the logout page * * @param {boolean} [parameters.oauth2AllowImplicitFlow] Whether to allow * implicit grant flow for OAuth2 * + * @param {boolean} [parameters.oauth2AllowUrlPathMatching] 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. + * + * @param {array} [parameters.oauth2Permissions] 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. + * + * @param {boolean} [parameters.oauth2RequirePostResponse] 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. + * + * @param {array} [parameters.orgRestrictions] A list of tenants allowed to + * access application. + * + * @param {object} [parameters.optionalClaims] + * + * @param {array} [parameters.optionalClaims.idToken] Optional claims requested + * to be included in the id token. + * + * @param {array} [parameters.optionalClaims.accessToken] Optional claims + * requested to be included in the access token. + * + * @param {array} [parameters.optionalClaims.samlToken] Optional claims + * requested to be included in the saml token. + * + * @param {array} [parameters.passwordCredentials] A collection of + * PasswordCredential objects + * + * @param {array} [parameters.preAuthorizedApplications] list of + * pre-authorizaed applications. + * + * @param {boolean} [parameters.publicClient] Specifies whether this + * application is a public client (such as an installed application running on + * a mobile device). Default is false. + * + * @param {string} [parameters.publisherDomain] Reliable domain which can be + * used to identify an application. + * + * @param {array} [parameters.replyUrls] A collection of reply URLs for the + * application. + * * @param {array} [parameters.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. * + * @param {string} [parameters.samlMetadataUrl] The URL to the SAML metadata + * for the application. + * + * @param {string} [parameters.signInAudience] Audience for signing in to the + * application (AzureADMyOrganizatio, AzureADAllorganizations, + * AzureADAndMicrosofAccounts). + * + * @param {string} [parameters.wwwHomepage] The primary Web page. + * * @param {object} [options] Optional Parameters. * * @param {object} [options.customHeaders] Headers that will be added to the @@ -477,38 +655,126 @@ export interface Applications { * * @param {object} parameters Parameters to update an existing application. * + * @param {boolean} [parameters.allowGuestsSignIn] A property on the + * application to indicate if the application accepts other IDPs or not or + * partially accepts. + * + * @param {boolean} [parameters.allowPassthroughUsers] Indicates that the + * application supports pass through users who have no presence in the resource + * tenant. + * + * @param {string} [parameters.appLogoUrl] The url for the application logo + * image stored in a CDN. + * * @param {array} [parameters.appRoles] The collection of application roles * that an application may declare. These roles can be assigned to users, * groups or service principals. * + * @param {array} [parameters.appPermissions] The application permissions. + * * @param {boolean} [parameters.availableToOtherTenants] Whether the - * application is available to other tenants + * application is available to other tenants. * * @param {string} [parameters.displayName] The display name of the * application. * + * @param {string} [parameters.errorUrl] A URL provided by the author of the + * application to report errors when using the application. + * * @param {string} [parameters.homepage] The home page of the application. * * @param {array} [parameters.identifierUris] A collection of URIs for the * application. * - * @param {array} [parameters.replyUrls] A collection of reply URLs for the - * application. + * @param {object} [parameters.informationalUrls] urls with more informations + * of the application. * - * @param {array} [parameters.keyCredentials] The list of KeyCredential + * @param {string} [parameters.informationalUrls.termsOfService] The terms of + * service URI + * + * @param {string} [parameters.informationalUrls.marketing] The marketing URI + * + * @param {string} [parameters.informationalUrls.privacy] The privacy policy + * URI + * + * @param {string} [parameters.informationalUrls.support] The support URI + * + * @param {boolean} [parameters.isDeviceOnlyAuthSupported] Specifies whether + * this application supports device authentication without a user. The default + * is false. + * + * @param {array} [parameters.keyCredentials] A collection of KeyCredential * objects. * - * @param {array} [parameters.passwordCredentials] The list of - * PasswordCredential objects. + * @param {array} [parameters.knownClientApplications] 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). + * + * @param {string} [parameters.logoutUrl] the url of the logout page * * @param {boolean} [parameters.oauth2AllowImplicitFlow] Whether to allow * implicit grant flow for OAuth2 * + * @param {boolean} [parameters.oauth2AllowUrlPathMatching] 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. + * + * @param {array} [parameters.oauth2Permissions] 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. + * + * @param {boolean} [parameters.oauth2RequirePostResponse] 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. + * + * @param {array} [parameters.orgRestrictions] A list of tenants allowed to + * access application. + * + * @param {object} [parameters.optionalClaims] + * + * @param {array} [parameters.optionalClaims.idToken] Optional claims requested + * to be included in the id token. + * + * @param {array} [parameters.optionalClaims.accessToken] Optional claims + * requested to be included in the access token. + * + * @param {array} [parameters.optionalClaims.samlToken] Optional claims + * requested to be included in the saml token. + * + * @param {array} [parameters.passwordCredentials] A collection of + * PasswordCredential objects + * + * @param {array} [parameters.preAuthorizedApplications] list of + * pre-authorizaed applications. + * + * @param {boolean} [parameters.publicClient] Specifies whether this + * application is a public client (such as an installed application running on + * a mobile device). Default is false. + * + * @param {string} [parameters.publisherDomain] Reliable domain which can be + * used to identify an application. + * + * @param {array} [parameters.replyUrls] A collection of reply URLs for the + * application. + * * @param {array} [parameters.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. * + * @param {string} [parameters.samlMetadataUrl] The URL to the SAML metadata + * for the application. + * + * @param {string} [parameters.signInAudience] Audience for signing in to the + * application (AzureADMyOrganizatio, AzureADAllorganizations, + * AzureADAndMicrosofAccounts). + * + * @param {string} [parameters.wwwHomepage] The primary Web page. + * * @param {object} [options] Optional Parameters. * * @param {object} [options.customHeaders] Headers that will be added to the @@ -529,38 +795,126 @@ export interface Applications { * * @param {object} parameters Parameters to update an existing application. * + * @param {boolean} [parameters.allowGuestsSignIn] A property on the + * application to indicate if the application accepts other IDPs or not or + * partially accepts. + * + * @param {boolean} [parameters.allowPassthroughUsers] Indicates that the + * application supports pass through users who have no presence in the resource + * tenant. + * + * @param {string} [parameters.appLogoUrl] The url for the application logo + * image stored in a CDN. + * * @param {array} [parameters.appRoles] The collection of application roles * that an application may declare. These roles can be assigned to users, * groups or service principals. * + * @param {array} [parameters.appPermissions] The application permissions. + * * @param {boolean} [parameters.availableToOtherTenants] Whether the - * application is available to other tenants + * application is available to other tenants. * * @param {string} [parameters.displayName] The display name of the * application. * + * @param {string} [parameters.errorUrl] A URL provided by the author of the + * application to report errors when using the application. + * * @param {string} [parameters.homepage] The home page of the application. * * @param {array} [parameters.identifierUris] A collection of URIs for the * application. * - * @param {array} [parameters.replyUrls] A collection of reply URLs for the - * application. + * @param {object} [parameters.informationalUrls] urls with more informations + * of the application. + * + * @param {string} [parameters.informationalUrls.termsOfService] The terms of + * service URI + * + * @param {string} [parameters.informationalUrls.marketing] The marketing URI + * + * @param {string} [parameters.informationalUrls.privacy] The privacy policy + * URI * - * @param {array} [parameters.keyCredentials] The list of KeyCredential + * @param {string} [parameters.informationalUrls.support] The support URI + * + * @param {boolean} [parameters.isDeviceOnlyAuthSupported] Specifies whether + * this application supports device authentication without a user. The default + * is false. + * + * @param {array} [parameters.keyCredentials] A collection of KeyCredential * objects. * - * @param {array} [parameters.passwordCredentials] The list of - * PasswordCredential objects. + * @param {array} [parameters.knownClientApplications] 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). + * + * @param {string} [parameters.logoutUrl] the url of the logout page * * @param {boolean} [parameters.oauth2AllowImplicitFlow] Whether to allow * implicit grant flow for OAuth2 * + * @param {boolean} [parameters.oauth2AllowUrlPathMatching] 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. + * + * @param {array} [parameters.oauth2Permissions] 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. + * + * @param {boolean} [parameters.oauth2RequirePostResponse] 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. + * + * @param {array} [parameters.orgRestrictions] A list of tenants allowed to + * access application. + * + * @param {object} [parameters.optionalClaims] + * + * @param {array} [parameters.optionalClaims.idToken] Optional claims requested + * to be included in the id token. + * + * @param {array} [parameters.optionalClaims.accessToken] Optional claims + * requested to be included in the access token. + * + * @param {array} [parameters.optionalClaims.samlToken] Optional claims + * requested to be included in the saml token. + * + * @param {array} [parameters.passwordCredentials] A collection of + * PasswordCredential objects + * + * @param {array} [parameters.preAuthorizedApplications] list of + * pre-authorizaed applications. + * + * @param {boolean} [parameters.publicClient] Specifies whether this + * application is a public client (such as an installed application running on + * a mobile device). Default is false. + * + * @param {string} [parameters.publisherDomain] Reliable domain which can be + * used to identify an application. + * + * @param {array} [parameters.replyUrls] A collection of reply URLs for the + * application. + * * @param {array} [parameters.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. * + * @param {string} [parameters.samlMetadataUrl] The URL to the SAML metadata + * for the application. + * + * @param {string} [parameters.signInAudience] Audience for signing in to the + * application (AzureADMyOrganizatio, AzureADAllorganizations, + * AzureADAndMicrosofAccounts). + * + * @param {string} [parameters.wwwHomepage] The primary Web page. + * * @param {object} [options] Optional Parameters. * * @param {object} [options.customHeaders] Headers that will be added to the @@ -2320,40 +2674,22 @@ export interface ServicePrincipals { * * @param {object} parameters Parameters to create a service principal. * - * @param {boolean} [parameters.accountEnabled] Whether the account is enabled - * - * @param {string} parameters.appId application Id + * @param {string} parameters.appId The application ID. * - * @param {boolean} [parameters.appRoleAssignmentRequired] Specifies whether an - * AppRoleAssignment to a user or group is required before Azure AD will issue - * a user or access token to the application. + * @param {array} [parameters.keyCredentials] The collection of key credentials + * associated with the service principal. * - * @param {string} [parameters.displayName] The display name for the service - * principal. + * @param {array} [parameters.passwordCredentials] The collection of password + * credentials associated with the service principal. * - * @param {string} [parameters.errorUrl] + * @param {string} [parameters.servicePrincipalType] the type of the servie + * principal * - * @param {string} [parameters.homepage] The URL to the homepage of the - * associated application. + * @param {string} [parameters.accountEnabled] whether or not the service + * principal account is enabled * - * @param {array} [parameters.keyCredentials] A collection of KeyCredential - * objects. - * - * @param {array} [parameters.passwordCredentials] A collection of - * PasswordCredential objects - * - * @param {string} [parameters.publisherName] The display name of the tenant in - * which the associated application is specified. - * - * @param {array} [parameters.replyUrls] A collection of reply URLs for the - * service principal. - * - * @param {string} [parameters.samlMetadataUrl] - * - * @param {array} [parameters.servicePrincipalNames] A collection of service - * principal names. - * - * @param {array} [parameters.tags] + * @param {array} [parameters.tags] Optional list of tags that you can apply to + * your service principals. Not nullable. * * @param {object} [options] Optional Parameters. * @@ -2373,40 +2709,22 @@ export interface ServicePrincipals { * * @param {object} parameters Parameters to create a service principal. * - * @param {boolean} [parameters.accountEnabled] Whether the account is enabled - * - * @param {string} parameters.appId application Id - * - * @param {boolean} [parameters.appRoleAssignmentRequired] Specifies whether an - * AppRoleAssignment to a user or group is required before Azure AD will issue - * a user or access token to the application. - * - * @param {string} [parameters.displayName] The display name for the service - * principal. - * - * @param {string} [parameters.errorUrl] - * - * @param {string} [parameters.homepage] The URL to the homepage of the - * associated application. - * - * @param {array} [parameters.keyCredentials] A collection of KeyCredential - * objects. - * - * @param {array} [parameters.passwordCredentials] A collection of - * PasswordCredential objects + * @param {string} parameters.appId The application ID. * - * @param {string} [parameters.publisherName] The display name of the tenant in - * which the associated application is specified. + * @param {array} [parameters.keyCredentials] The collection of key credentials + * associated with the service principal. * - * @param {array} [parameters.replyUrls] A collection of reply URLs for the - * service principal. + * @param {array} [parameters.passwordCredentials] The collection of password + * credentials associated with the service principal. * - * @param {string} [parameters.samlMetadataUrl] + * @param {string} [parameters.servicePrincipalType] the type of the servie + * principal * - * @param {array} [parameters.servicePrincipalNames] A collection of service - * principal names. + * @param {string} [parameters.accountEnabled] whether or not the service + * principal account is enabled * - * @param {array} [parameters.tags] + * @param {array} [parameters.tags] Optional list of tags that you can apply to + * your service principals. Not nullable. * * @param {object} [options] Optional Parameters. * @@ -2503,40 +2821,20 @@ export interface ServicePrincipals { * * @param {object} parameters Parameters to update a service principal. * - * @param {boolean} [parameters.accountEnabled] Whether the account is enabled - * - * @param {string} [parameters.appId] application Id - * - * @param {boolean} [parameters.appRoleAssignmentRequired] Specifies whether an - * AppRoleAssignment to a user or group is required before Azure AD will issue - * a user or access token to the application. - * - * @param {string} [parameters.displayName] The display name for the service - * principal. + * @param {array} [parameters.keyCredentials] The collection of key credentials + * associated with the service principal. * - * @param {string} [parameters.errorUrl] + * @param {array} [parameters.passwordCredentials] The collection of password + * credentials associated with the service principal. * - * @param {string} [parameters.homepage] The URL to the homepage of the - * associated application. + * @param {string} [parameters.servicePrincipalType] the type of the servie + * principal * - * @param {array} [parameters.keyCredentials] A collection of KeyCredential - * objects. - * - * @param {array} [parameters.passwordCredentials] A collection of - * PasswordCredential objects + * @param {string} [parameters.accountEnabled] whether or not the service + * principal account is enabled * - * @param {string} [parameters.publisherName] The display name of the tenant in - * which the associated application is specified. - * - * @param {array} [parameters.replyUrls] A collection of reply URLs for the - * service principal. - * - * @param {string} [parameters.samlMetadataUrl] - * - * @param {array} [parameters.servicePrincipalNames] A collection of service - * principal names. - * - * @param {array} [parameters.tags] + * @param {array} [parameters.tags] Optional list of tags that you can apply to + * your service principals. Not nullable. * * @param {object} [options] Optional Parameters. * @@ -2558,40 +2856,20 @@ export interface ServicePrincipals { * * @param {object} parameters Parameters to update a service principal. * - * @param {boolean} [parameters.accountEnabled] Whether the account is enabled + * @param {array} [parameters.keyCredentials] The collection of key credentials + * associated with the service principal. * - * @param {string} [parameters.appId] application Id + * @param {array} [parameters.passwordCredentials] The collection of password + * credentials associated with the service principal. * - * @param {boolean} [parameters.appRoleAssignmentRequired] Specifies whether an - * AppRoleAssignment to a user or group is required before Azure AD will issue - * a user or access token to the application. + * @param {string} [parameters.servicePrincipalType] the type of the servie + * principal * - * @param {string} [parameters.displayName] The display name for the service - * principal. + * @param {string} [parameters.accountEnabled] whether or not the service + * principal account is enabled * - * @param {string} [parameters.errorUrl] - * - * @param {string} [parameters.homepage] The URL to the homepage of the - * associated application. - * - * @param {array} [parameters.keyCredentials] A collection of KeyCredential - * objects. - * - * @param {array} [parameters.passwordCredentials] A collection of - * PasswordCredential objects - * - * @param {string} [parameters.publisherName] The display name of the tenant in - * which the associated application is specified. - * - * @param {array} [parameters.replyUrls] A collection of reply URLs for the - * service principal. - * - * @param {string} [parameters.samlMetadataUrl] - * - * @param {array} [parameters.servicePrincipalNames] A collection of service - * principal names. - * - * @param {array} [parameters.tags] + * @param {array} [parameters.tags] Optional list of tags that you can apply to + * your service principals. Not nullable. * * @param {object} [options] Optional Parameters. * @@ -3988,7 +4266,7 @@ export interface OAuth2 { /** - * Queries OAuth2 permissions for the relevant SP ObjectId of an app. + * Queries OAuth2 permissions grants for the relevant SP ObjectId of an app. * * @param {object} [options] Optional Parameters. * @@ -4000,14 +4278,14 @@ export interface OAuth2 { * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. */ - getWithHttpOperationResponse(options?: { filter? : string, customHeaders? : { [headerName: string]: string; } }): Promise>; + getWithHttpOperationResponse(options?: { filter? : string, customHeaders? : { [headerName: string]: string; } }): Promise>; /** - * Queries OAuth2 permissions for the relevant SP ObjectId of an app. + * Queries OAuth2 permissions grants for the relevant SP ObjectId of an app. * * @param {object} [options] Optional Parameters. * @@ -4024,7 +4302,7 @@ export interface OAuth2 { * * {Promise} A promise is returned. * - * @resolve {Permissions} - The deserialized result object. + * @resolve {PermissionsListResult} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. * @@ -4032,16 +4310,16 @@ export interface OAuth2 { * * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. * - * {Permissions} [result] - The deserialized result object if an error did not occur. - * See {@link Permissions} for more information. + * {PermissionsListResult} [result] - The deserialized result object if an error did not occur. + * See {@link PermissionsListResult} for more information. * * {WebResource} [request] - The HTTP Request object if an error did not occur. * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - get(options?: { filter? : string, customHeaders? : { [headerName: string]: string; } }): Promise; - get(callback: ServiceCallback): void; - get(options: { filter? : string, customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + get(options?: { filter? : string, customHeaders? : { [headerName: string]: string; } }): Promise; + get(callback: ServiceCallback): void; + get(options: { filter? : string, customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; /** @@ -4050,7 +4328,7 @@ export interface OAuth2 { * @param {object} [options] Optional Parameters. * * @param {object} [options.body] The relevant app Service Principal Object Id - * and the Service Principal Objecit Id you want to grant. + * and the Service Principal Object Id you want to grant. * * @param {string} [options.body.odatatype] * Microsoft.DirectoryServices.OAuth2PermissionGrant @@ -4058,6 +4336,8 @@ export interface OAuth2 { * @param {string} [options.body.clientId] The objectId of the Service * Principal associated with the app * + * @param {string} [options.body.objectId] The objectId of the permission grant + * * @param {string} [options.body.consentType] Typically set to AllPrincipals * * @param {object} [options.body.principalId] Set to null if AllPrincipals is @@ -4089,7 +4369,7 @@ export interface OAuth2 { * @param {object} [options] Optional Parameters. * * @param {object} [options.body] The relevant app Service Principal Object Id - * and the Service Principal Objecit Id you want to grant. + * and the Service Principal Object Id you want to grant. * * @param {string} [options.body.odatatype] * Microsoft.DirectoryServices.OAuth2PermissionGrant @@ -4097,6 +4377,8 @@ export interface OAuth2 { * @param {string} [options.body.clientId] The objectId of the Service * Principal associated with the app * + * @param {string} [options.body.objectId] The objectId of the permission grant + * * @param {string} [options.body.consentType] Typically set to AllPrincipals * * @param {object} [options.body.principalId] Set to null if AllPrincipals is @@ -4139,4 +4421,115 @@ export interface OAuth2 { grant(options?: { body? : models.Permissions, customHeaders? : { [headerName: string]: string; } }): Promise; grant(callback: ServiceCallback): void; grant(options: { body? : models.Permissions, customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + + + /** + * Delete a OAuth2 permission grant for the relevant resource Ids of an app. + * + * @param {string} objectId The object ID of a permission grant. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @returns {Promise} A promise is returned + * + * @resolve {HttpOperationResponse} - The deserialized result object. + * + * @reject {Error|ServiceError} - The error object. + */ + deleteMethodWithHttpOperationResponse(objectId: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + + /** + * Delete a OAuth2 permission grant for the relevant resource Ids of an app. + * + * @param {string} objectId The object ID of a permission grant. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {ServiceCallback} [optionalCallback] - The optional callback. + * + * @returns {ServiceCallback|Promise} If a callback was passed as the last + * parameter then it returns the callback else returns a Promise. + * + * {Promise} A promise is returned. + * + * @resolve {null} - The deserialized result object. + * + * @reject {Error|ServiceError} - The error object. + * + * {ServiceCallback} optionalCallback(err, result, request, response) + * + * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. + * + * {null} [result] - The deserialized result object if an error did not occur. + * + * {WebResource} [request] - The HTTP Request object if an error did not occur. + * + * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. + */ + deleteMethod(objectId: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + deleteMethod(objectId: string, callback: ServiceCallback): void; + deleteMethod(objectId: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + + + /** + * Queries OAuth2 permissions grants for the relevant SP ObjectId of an app. + * + * @param {string} nextPageLink The NextLink from the previous successful call + * to List operation. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @returns {Promise} A promise is returned + * + * @resolve {HttpOperationResponse} - The deserialized result object. + * + * @reject {Error|ServiceError} - The error object. + */ + getNextWithHttpOperationResponse(nextPageLink: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + + /** + * Queries OAuth2 permissions grants for the relevant SP ObjectId of an app. + * + * @param {string} nextPageLink The NextLink from the previous successful call + * to List operation. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {ServiceCallback} [optionalCallback] - The optional callback. + * + * @returns {ServiceCallback|Promise} If a callback was passed as the last + * parameter then it returns the callback else returns a Promise. + * + * {Promise} A promise is returned. + * + * @resolve {PermissionsListResult} - The deserialized result object. + * + * @reject {Error|ServiceError} - The error object. + * + * {ServiceCallback} optionalCallback(err, result, request, response) + * + * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. + * + * {PermissionsListResult} [result] - The deserialized result object if an error did not occur. + * See {@link PermissionsListResult} for more information. + * + * {WebResource} [request] - The HTTP Request object if an error did not occur. + * + * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. + */ + getNext(nextPageLink: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + getNext(nextPageLink: string, callback: ServiceCallback): void; + getNext(nextPageLink: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; } diff --git a/lib/services/graphManagement/lib/operations/oAuth2.js b/lib/services/graphManagement/lib/operations/oAuth2.js index a38d0b851f..f575f193a8 100644 --- a/lib/services/graphManagement/lib/operations/oAuth2.js +++ b/lib/services/graphManagement/lib/operations/oAuth2.js @@ -15,7 +15,7 @@ const msRestAzure = require('ms-rest-azure'); const WebResource = msRest.WebResource; /** - * Queries OAuth2 permissions for the relevant SP ObjectId of an app. + * Queries OAuth2 permissions grants for the relevant SP ObjectId of an app. * * @param {object} [options] Optional Parameters. * @@ -32,7 +32,7 @@ const WebResource = msRest.WebResource; * {Error} err - The Error object if an error occurred, null otherwise. * * {object} [result] - The deserialized result object if an error did not occur. - * See {@link Permissions} for more information. + * See {@link PermissionsListResult} for more information. * * {object} [request] - The HTTP Request object if an error did not occur. * @@ -142,7 +142,7 @@ function _get(options, callback) { parsedResponse = JSON.parse(responseBody); result = JSON.parse(responseBody); if (parsedResponse !== null && parsedResponse !== undefined) { - let resultMapper = new client.models['Permissions']().mapper(); + let resultMapper = new client.models['PermissionsListResult']().mapper(); result = client.deserialize(resultMapper, parsedResponse, 'result'); } } catch (error) { @@ -163,7 +163,7 @@ function _get(options, callback) { * @param {object} [options] Optional Parameters. * * @param {object} [options.body] The relevant app Service Principal Object Id - * and the Service Principal Objecit Id you want to grant. + * and the Service Principal Object Id you want to grant. * * @param {string} [options.body.odatatype] * Microsoft.DirectoryServices.OAuth2PermissionGrant @@ -171,6 +171,8 @@ function _get(options, callback) { * @param {string} [options.body.clientId] The objectId of the Service * Principal associated with the app * + * @param {string} [options.body.objectId] The objectId of the permission grant + * * @param {string} [options.body.consentType] Typically set to AllPrincipals * * @param {object} [options.body.principalId] Set to null if AllPrincipals is @@ -328,6 +330,255 @@ function _grant(options, callback) { }); } +/** + * Delete a OAuth2 permission grant for the relevant resource Ids of an app. + * + * @param {string} objectId The object ID of a permission grant. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {function} callback - The callback. + * + * @returns {function} callback(err, result, request, response) + * + * {Error} err - The Error object if an error occurred, null otherwise. + * + * {null} [result] - The deserialized result object if an error did not occur. + * + * {object} [request] - The HTTP Request object if an error did not occur. + * + * {stream} [response] - The HTTP Response stream if an error did not occur. + */ +function _deleteMethod(objectId, options, callback) { + /* jshint validthis: true */ + let client = this.client; + if(!callback && typeof options === 'function') { + callback = options; + options = null; + } + if (!callback) { + throw new Error('callback cannot be null.'); + } + // Validate + try { + if (objectId === null || objectId === undefined || typeof objectId.valueOf() !== 'string') { + throw new Error('objectId cannot be null or undefined and it must be of type string.'); + } + if (this.client.apiVersion === null || this.client.apiVersion === undefined || typeof this.client.apiVersion.valueOf() !== 'string') { + throw new Error('this.client.apiVersion cannot be null or undefined and it must be of type string.'); + } + if (this.client.tenantID === null || this.client.tenantID === undefined || typeof this.client.tenantID.valueOf() !== 'string') { + throw new Error('this.client.tenantID cannot be null or undefined and it must be of type string.'); + } + if (this.client.acceptLanguage !== null && this.client.acceptLanguage !== undefined && typeof this.client.acceptLanguage.valueOf() !== 'string') { + throw new Error('this.client.acceptLanguage must be of type string.'); + } + } catch (error) { + return callback(error); + } + + // Construct URL + let baseUrl = this.client.baseUri; + let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + '{tenantID}/oauth2PermissionGrants/{objectId}'; + requestUrl = requestUrl.replace('{objectId}', encodeURIComponent(objectId)); + requestUrl = requestUrl.replace('{tenantID}', encodeURIComponent(this.client.tenantID)); + let queryParameters = []; + queryParameters.push('api-version=' + encodeURIComponent(this.client.apiVersion)); + if (queryParameters.length > 0) { + requestUrl += '?' + queryParameters.join('&'); + } + + // Create HTTP transport objects + let httpRequest = new WebResource(); + httpRequest.method = 'DELETE'; + httpRequest.url = requestUrl; + httpRequest.headers = {}; + // Set Headers + httpRequest.headers['Content-Type'] = 'application/json; charset=utf-8'; + if (this.client.generateClientRequestId) { + httpRequest.headers['x-ms-client-request-id'] = msRestAzure.generateUuid(); + } + if (this.client.acceptLanguage !== undefined && this.client.acceptLanguage !== null) { + httpRequest.headers['accept-language'] = this.client.acceptLanguage; + } + if(options) { + for(let headerName in options['customHeaders']) { + if (options['customHeaders'].hasOwnProperty(headerName)) { + httpRequest.headers[headerName] = options['customHeaders'][headerName]; + } + } + } + httpRequest.body = null; + // Send Request + return client.pipeline(httpRequest, (err, response, responseBody) => { + if (err) { + return callback(err); + } + let statusCode = response.statusCode; + if (statusCode !== 204) { + let error = new Error(responseBody); + error.statusCode = response.statusCode; + error.request = msRest.stripRequest(httpRequest); + error.response = msRest.stripResponse(response); + if (responseBody === '') responseBody = null; + let parsedErrorResponse; + try { + parsedErrorResponse = JSON.parse(responseBody); + if (parsedErrorResponse) { + let internalError = null; + if (parsedErrorResponse.error) internalError = parsedErrorResponse.error; + error.code = internalError ? internalError.code : parsedErrorResponse.code; + error.message = internalError ? internalError.message : parsedErrorResponse.message; + } + if (parsedErrorResponse !== null && parsedErrorResponse !== undefined) { + let resultMapper = new client.models['GraphError']().mapper(); + error.body = client.deserialize(resultMapper, parsedErrorResponse, 'error.body'); + } + } catch (defaultError) { + error.message = `Error "${defaultError.message}" occurred in deserializing the responseBody ` + + `- "${responseBody}" for the default response.`; + return callback(error); + } + return callback(error); + } + // Create Result + let result = null; + if (responseBody === '') responseBody = null; + + return callback(null, result, httpRequest, response); + }); +} + +/** + * Queries OAuth2 permissions grants for the relevant SP ObjectId of an app. + * + * @param {string} nextPageLink The NextLink from the previous successful call + * to List operation. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {function} callback - The callback. + * + * @returns {function} callback(err, result, request, response) + * + * {Error} err - The Error object if an error occurred, null otherwise. + * + * {object} [result] - The deserialized result object if an error did not occur. + * See {@link PermissionsListResult} for more information. + * + * {object} [request] - The HTTP Request object if an error did not occur. + * + * {stream} [response] - The HTTP Response stream if an error did not occur. + */ +function _getNext(nextPageLink, options, callback) { + /* jshint validthis: true */ + let client = this.client; + if(!callback && typeof options === 'function') { + callback = options; + options = null; + } + if (!callback) { + throw new Error('callback cannot be null.'); + } + // Validate + try { + if (nextPageLink === null || nextPageLink === undefined || typeof nextPageLink.valueOf() !== 'string') { + throw new Error('nextPageLink cannot be null or undefined and it must be of type string.'); + } + if (this.client.acceptLanguage !== null && this.client.acceptLanguage !== undefined && typeof this.client.acceptLanguage.valueOf() !== 'string') { + throw new Error('this.client.acceptLanguage must be of type string.'); + } + } catch (error) { + return callback(error); + } + + // Construct URL + let requestUrl = '{nextLink}'; + requestUrl = requestUrl.replace('{nextLink}', nextPageLink); + + // Create HTTP transport objects + let httpRequest = new WebResource(); + httpRequest.method = 'GET'; + httpRequest.url = requestUrl; + httpRequest.headers = {}; + // Set Headers + httpRequest.headers['Content-Type'] = 'application/json; charset=utf-8'; + if (this.client.generateClientRequestId) { + httpRequest.headers['x-ms-client-request-id'] = msRestAzure.generateUuid(); + } + if (this.client.acceptLanguage !== undefined && this.client.acceptLanguage !== null) { + httpRequest.headers['accept-language'] = this.client.acceptLanguage; + } + if(options) { + for(let headerName in options['customHeaders']) { + if (options['customHeaders'].hasOwnProperty(headerName)) { + httpRequest.headers[headerName] = options['customHeaders'][headerName]; + } + } + } + httpRequest.body = null; + // Send Request + return client.pipeline(httpRequest, (err, response, responseBody) => { + if (err) { + return callback(err); + } + let statusCode = response.statusCode; + if (statusCode !== 200) { + let error = new Error(responseBody); + error.statusCode = response.statusCode; + error.request = msRest.stripRequest(httpRequest); + error.response = msRest.stripResponse(response); + if (responseBody === '') responseBody = null; + let parsedErrorResponse; + try { + parsedErrorResponse = JSON.parse(responseBody); + if (parsedErrorResponse) { + if (parsedErrorResponse.error) parsedErrorResponse = parsedErrorResponse.error; + if (parsedErrorResponse.code) error.code = parsedErrorResponse.code; + if (parsedErrorResponse.message) error.message = parsedErrorResponse.message; + } + if (parsedErrorResponse !== null && parsedErrorResponse !== undefined) { + let resultMapper = new client.models['CloudError']().mapper(); + error.body = client.deserialize(resultMapper, parsedErrorResponse, 'error.body'); + } + } catch (defaultError) { + error.message = `Error "${defaultError.message}" occurred in deserializing the responseBody ` + + `- "${responseBody}" for the default response.`; + return callback(error); + } + return callback(error); + } + // Create Result + let result = null; + if (responseBody === '') responseBody = null; + // Deserialize Response + if (statusCode === 200) { + let parsedResponse = null; + try { + parsedResponse = JSON.parse(responseBody); + result = JSON.parse(responseBody); + if (parsedResponse !== null && parsedResponse !== undefined) { + let resultMapper = new client.models['PermissionsListResult']().mapper(); + result = client.deserialize(resultMapper, parsedResponse, 'result'); + } + } catch (error) { + let deserializationError = new Error(`Error ${error} occurred in deserializing the responseBody - ${responseBody}`); + deserializationError.request = msRest.stripRequest(httpRequest); + deserializationError.response = msRest.stripResponse(response); + return callback(deserializationError); + } + } + + return callback(null, result, httpRequest, response); + }); +} + /** Class representing a OAuth2. */ class OAuth2 { /** @@ -338,10 +589,12 @@ class OAuth2 { this.client = client; this._get = _get; this._grant = _grant; + this._deleteMethod = _deleteMethod; + this._getNext = _getNext; } /** - * Queries OAuth2 permissions for the relevant SP ObjectId of an app. + * Queries OAuth2 permissions grants for the relevant SP ObjectId of an app. * * @param {object} [options] Optional Parameters. * @@ -353,7 +606,7 @@ class OAuth2 { * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error} - The error object. */ @@ -372,7 +625,7 @@ class OAuth2 { } /** - * Queries OAuth2 permissions for the relevant SP ObjectId of an app. + * Queries OAuth2 permissions grants for the relevant SP ObjectId of an app. * * @param {object} [options] Optional Parameters. * @@ -389,7 +642,7 @@ class OAuth2 { * * {Promise} A promise is returned * - * @resolve {Permissions} - The deserialized result object. + * @resolve {PermissionsListResult} - The deserialized result object. * * @reject {Error} - The error object. * @@ -398,7 +651,7 @@ class OAuth2 { * {Error} err - The Error object if an error occurred, null otherwise. * * {object} [result] - The deserialized result object if an error did not occur. - * See {@link Permissions} for more information. + * See {@link PermissionsListResult} for more information. * * {object} [request] - The HTTP Request object if an error did not occur. * @@ -430,7 +683,7 @@ class OAuth2 { * @param {object} [options] Optional Parameters. * * @param {object} [options.body] The relevant app Service Principal Object Id - * and the Service Principal Objecit Id you want to grant. + * and the Service Principal Object Id you want to grant. * * @param {string} [options.body.odatatype] * Microsoft.DirectoryServices.OAuth2PermissionGrant @@ -438,6 +691,8 @@ class OAuth2 { * @param {string} [options.body.clientId] The objectId of the Service * Principal associated with the app * + * @param {string} [options.body.objectId] The objectId of the permission grant + * * @param {string} [options.body.consentType] Typically set to AllPrincipals * * @param {object} [options.body.principalId] Set to null if AllPrincipals is @@ -481,7 +736,7 @@ class OAuth2 { * @param {object} [options] Optional Parameters. * * @param {object} [options.body] The relevant app Service Principal Object Id - * and the Service Principal Objecit Id you want to grant. + * and the Service Principal Object Id you want to grant. * * @param {string} [options.body.odatatype] * Microsoft.DirectoryServices.OAuth2PermissionGrant @@ -489,6 +744,8 @@ class OAuth2 { * @param {string} [options.body.clientId] The objectId of the Service * Principal associated with the app * + * @param {string} [options.body.objectId] The objectId of the permission grant + * * @param {string} [options.body.consentType] Typically set to AllPrincipals * * @param {object} [options.body.principalId] Set to null if AllPrincipals is @@ -548,6 +805,171 @@ class OAuth2 { } } + /** + * Delete a OAuth2 permission grant for the relevant resource Ids of an app. + * + * @param {string} objectId The object ID of a permission grant. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @returns {Promise} A promise is returned + * + * @resolve {HttpOperationResponse} - The deserialized result object. + * + * @reject {Error} - The error object. + */ + deleteMethodWithHttpOperationResponse(objectId, options) { + let client = this.client; + let self = this; + return new Promise((resolve, reject) => { + self._deleteMethod(objectId, options, (err, result, request, response) => { + let httpOperationResponse = new msRest.HttpOperationResponse(request, response); + httpOperationResponse.body = result; + if (err) { reject(err); } + else { resolve(httpOperationResponse); } + return; + }); + }); + } + + /** + * Delete a OAuth2 permission grant for the relevant resource Ids of an app. + * + * @param {string} objectId The object ID of a permission grant. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {function} [optionalCallback] - The optional callback. + * + * @returns {function|Promise} If a callback was passed as the last parameter + * then it returns the callback else returns a Promise. + * + * {Promise} A promise is returned + * + * @resolve {null} - The deserialized result object. + * + * @reject {Error} - The error object. + * + * {function} optionalCallback(err, result, request, response) + * + * {Error} err - The Error object if an error occurred, null otherwise. + * + * {null} [result] - The deserialized result object if an error did not occur. + * + * {object} [request] - The HTTP Request object if an error did not occur. + * + * {stream} [response] - The HTTP Response stream if an error did not occur. + */ + deleteMethod(objectId, options, optionalCallback) { + let client = this.client; + let self = this; + if (!optionalCallback && typeof options === 'function') { + optionalCallback = options; + options = null; + } + if (!optionalCallback) { + return new Promise((resolve, reject) => { + self._deleteMethod(objectId, options, (err, result, request, response) => { + if (err) { reject(err); } + else { resolve(result); } + return; + }); + }); + } else { + return self._deleteMethod(objectId, options, optionalCallback); + } + } + + /** + * Queries OAuth2 permissions grants for the relevant SP ObjectId of an app. + * + * @param {string} nextPageLink The NextLink from the previous successful call + * to List operation. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @returns {Promise} A promise is returned + * + * @resolve {HttpOperationResponse} - The deserialized result object. + * + * @reject {Error} - The error object. + */ + getNextWithHttpOperationResponse(nextPageLink, options) { + let client = this.client; + let self = this; + return new Promise((resolve, reject) => { + self._getNext(nextPageLink, options, (err, result, request, response) => { + let httpOperationResponse = new msRest.HttpOperationResponse(request, response); + httpOperationResponse.body = result; + if (err) { reject(err); } + else { resolve(httpOperationResponse); } + return; + }); + }); + } + + /** + * Queries OAuth2 permissions grants for the relevant SP ObjectId of an app. + * + * @param {string} nextPageLink The NextLink from the previous successful call + * to List operation. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {function} [optionalCallback] - The optional callback. + * + * @returns {function|Promise} If a callback was passed as the last parameter + * then it returns the callback else returns a Promise. + * + * {Promise} A promise is returned + * + * @resolve {PermissionsListResult} - The deserialized result object. + * + * @reject {Error} - The error object. + * + * {function} optionalCallback(err, result, request, response) + * + * {Error} err - The Error object if an error occurred, null otherwise. + * + * {object} [result] - The deserialized result object if an error did not occur. + * See {@link PermissionsListResult} for more information. + * + * {object} [request] - The HTTP Request object if an error did not occur. + * + * {stream} [response] - The HTTP Response stream if an error did not occur. + */ + getNext(nextPageLink, options, optionalCallback) { + let client = this.client; + let self = this; + if (!optionalCallback && typeof options === 'function') { + optionalCallback = options; + options = null; + } + if (!optionalCallback) { + return new Promise((resolve, reject) => { + self._getNext(nextPageLink, options, (err, result, request, response) => { + if (err) { reject(err); } + else { resolve(result); } + return; + }); + }); + } else { + return self._getNext(nextPageLink, options, optionalCallback); + } + } + } module.exports = OAuth2; diff --git a/lib/services/graphManagement/lib/operations/servicePrincipals.js b/lib/services/graphManagement/lib/operations/servicePrincipals.js index e9d1c6e566..312b61104a 100644 --- a/lib/services/graphManagement/lib/operations/servicePrincipals.js +++ b/lib/services/graphManagement/lib/operations/servicePrincipals.js @@ -19,40 +19,22 @@ const WebResource = msRest.WebResource; * * @param {object} parameters Parameters to create a service principal. * - * @param {boolean} [parameters.accountEnabled] Whether the account is enabled + * @param {string} parameters.appId The application ID. * - * @param {string} parameters.appId application Id + * @param {array} [parameters.keyCredentials] The collection of key credentials + * associated with the service principal. * - * @param {boolean} [parameters.appRoleAssignmentRequired] Specifies whether an - * AppRoleAssignment to a user or group is required before Azure AD will issue - * a user or access token to the application. + * @param {array} [parameters.passwordCredentials] The collection of password + * credentials associated with the service principal. * - * @param {string} [parameters.displayName] The display name for the service - * principal. + * @param {string} [parameters.servicePrincipalType] the type of the servie + * principal * - * @param {string} [parameters.errorUrl] + * @param {string} [parameters.accountEnabled] whether or not the service + * principal account is enabled * - * @param {string} [parameters.homepage] The URL to the homepage of the - * associated application. - * - * @param {array} [parameters.keyCredentials] A collection of KeyCredential - * objects. - * - * @param {array} [parameters.passwordCredentials] A collection of - * PasswordCredential objects - * - * @param {string} [parameters.publisherName] The display name of the tenant in - * which the associated application is specified. - * - * @param {array} [parameters.replyUrls] A collection of reply URLs for the - * service principal. - * - * @param {string} [parameters.samlMetadataUrl] - * - * @param {array} [parameters.servicePrincipalNames] A collection of service - * principal names. - * - * @param {array} [parameters.tags] + * @param {array} [parameters.tags] Optional list of tags that you can apply to + * your service principals. Not nullable. * * @param {object} [options] Optional Parameters. * @@ -353,40 +335,20 @@ function _list(options, callback) { * * @param {object} parameters Parameters to update a service principal. * - * @param {boolean} [parameters.accountEnabled] Whether the account is enabled - * - * @param {string} [parameters.appId] application Id - * - * @param {boolean} [parameters.appRoleAssignmentRequired] Specifies whether an - * AppRoleAssignment to a user or group is required before Azure AD will issue - * a user or access token to the application. - * - * @param {string} [parameters.displayName] The display name for the service - * principal. - * - * @param {string} [parameters.errorUrl] - * - * @param {string} [parameters.homepage] The URL to the homepage of the - * associated application. + * @param {array} [parameters.keyCredentials] The collection of key credentials + * associated with the service principal. * - * @param {array} [parameters.keyCredentials] A collection of KeyCredential - * objects. + * @param {array} [parameters.passwordCredentials] The collection of password + * credentials associated with the service principal. * - * @param {array} [parameters.passwordCredentials] A collection of - * PasswordCredential objects + * @param {string} [parameters.servicePrincipalType] the type of the servie + * principal * - * @param {string} [parameters.publisherName] The display name of the tenant in - * which the associated application is specified. + * @param {string} [parameters.accountEnabled] whether or not the service + * principal account is enabled * - * @param {array} [parameters.replyUrls] A collection of reply URLs for the - * service principal. - * - * @param {string} [parameters.samlMetadataUrl] - * - * @param {array} [parameters.servicePrincipalNames] A collection of service - * principal names. - * - * @param {array} [parameters.tags] + * @param {array} [parameters.tags] Optional list of tags that you can apply to + * your service principals. Not nullable. * * @param {object} [options] Optional Parameters. * @@ -1800,40 +1762,22 @@ class ServicePrincipals { * * @param {object} parameters Parameters to create a service principal. * - * @param {boolean} [parameters.accountEnabled] Whether the account is enabled - * - * @param {string} parameters.appId application Id - * - * @param {boolean} [parameters.appRoleAssignmentRequired] Specifies whether an - * AppRoleAssignment to a user or group is required before Azure AD will issue - * a user or access token to the application. - * - * @param {string} [parameters.displayName] The display name for the service - * principal. + * @param {string} parameters.appId The application ID. * - * @param {string} [parameters.errorUrl] + * @param {array} [parameters.keyCredentials] The collection of key credentials + * associated with the service principal. * - * @param {string} [parameters.homepage] The URL to the homepage of the - * associated application. + * @param {array} [parameters.passwordCredentials] The collection of password + * credentials associated with the service principal. * - * @param {array} [parameters.keyCredentials] A collection of KeyCredential - * objects. + * @param {string} [parameters.servicePrincipalType] the type of the servie + * principal * - * @param {array} [parameters.passwordCredentials] A collection of - * PasswordCredential objects + * @param {string} [parameters.accountEnabled] whether or not the service + * principal account is enabled * - * @param {string} [parameters.publisherName] The display name of the tenant in - * which the associated application is specified. - * - * @param {array} [parameters.replyUrls] A collection of reply URLs for the - * service principal. - * - * @param {string} [parameters.samlMetadataUrl] - * - * @param {array} [parameters.servicePrincipalNames] A collection of service - * principal names. - * - * @param {array} [parameters.tags] + * @param {array} [parameters.tags] Optional list of tags that you can apply to + * your service principals. Not nullable. * * @param {object} [options] Optional Parameters. * @@ -1865,40 +1809,22 @@ class ServicePrincipals { * * @param {object} parameters Parameters to create a service principal. * - * @param {boolean} [parameters.accountEnabled] Whether the account is enabled - * - * @param {string} parameters.appId application Id + * @param {string} parameters.appId The application ID. * - * @param {boolean} [parameters.appRoleAssignmentRequired] Specifies whether an - * AppRoleAssignment to a user or group is required before Azure AD will issue - * a user or access token to the application. + * @param {array} [parameters.keyCredentials] The collection of key credentials + * associated with the service principal. * - * @param {string} [parameters.displayName] The display name for the service - * principal. + * @param {array} [parameters.passwordCredentials] The collection of password + * credentials associated with the service principal. * - * @param {string} [parameters.errorUrl] + * @param {string} [parameters.servicePrincipalType] the type of the servie + * principal * - * @param {string} [parameters.homepage] The URL to the homepage of the - * associated application. + * @param {string} [parameters.accountEnabled] whether or not the service + * principal account is enabled * - * @param {array} [parameters.keyCredentials] A collection of KeyCredential - * objects. - * - * @param {array} [parameters.passwordCredentials] A collection of - * PasswordCredential objects - * - * @param {string} [parameters.publisherName] The display name of the tenant in - * which the associated application is specified. - * - * @param {array} [parameters.replyUrls] A collection of reply URLs for the - * service principal. - * - * @param {string} [parameters.samlMetadataUrl] - * - * @param {array} [parameters.servicePrincipalNames] A collection of service - * principal names. - * - * @param {array} [parameters.tags] + * @param {array} [parameters.tags] Optional list of tags that you can apply to + * your service principals. Not nullable. * * @param {object} [options] Optional Parameters. * @@ -2037,40 +1963,20 @@ class ServicePrincipals { * * @param {object} parameters Parameters to update a service principal. * - * @param {boolean} [parameters.accountEnabled] Whether the account is enabled - * - * @param {string} [parameters.appId] application Id - * - * @param {boolean} [parameters.appRoleAssignmentRequired] Specifies whether an - * AppRoleAssignment to a user or group is required before Azure AD will issue - * a user or access token to the application. - * - * @param {string} [parameters.displayName] The display name for the service - * principal. - * - * @param {string} [parameters.errorUrl] - * - * @param {string} [parameters.homepage] The URL to the homepage of the - * associated application. + * @param {array} [parameters.keyCredentials] The collection of key credentials + * associated with the service principal. * - * @param {array} [parameters.keyCredentials] A collection of KeyCredential - * objects. + * @param {array} [parameters.passwordCredentials] The collection of password + * credentials associated with the service principal. * - * @param {array} [parameters.passwordCredentials] A collection of - * PasswordCredential objects + * @param {string} [parameters.servicePrincipalType] the type of the servie + * principal * - * @param {string} [parameters.publisherName] The display name of the tenant in - * which the associated application is specified. + * @param {string} [parameters.accountEnabled] whether or not the service + * principal account is enabled * - * @param {array} [parameters.replyUrls] A collection of reply URLs for the - * service principal. - * - * @param {string} [parameters.samlMetadataUrl] - * - * @param {array} [parameters.servicePrincipalNames] A collection of service - * principal names. - * - * @param {array} [parameters.tags] + * @param {array} [parameters.tags] Optional list of tags that you can apply to + * your service principals. Not nullable. * * @param {object} [options] Optional Parameters. * @@ -2104,40 +2010,20 @@ class ServicePrincipals { * * @param {object} parameters Parameters to update a service principal. * - * @param {boolean} [parameters.accountEnabled] Whether the account is enabled - * - * @param {string} [parameters.appId] application Id - * - * @param {boolean} [parameters.appRoleAssignmentRequired] Specifies whether an - * AppRoleAssignment to a user or group is required before Azure AD will issue - * a user or access token to the application. - * - * @param {string} [parameters.displayName] The display name for the service - * principal. - * - * @param {string} [parameters.errorUrl] - * - * @param {string} [parameters.homepage] The URL to the homepage of the - * associated application. - * - * @param {array} [parameters.keyCredentials] A collection of KeyCredential - * objects. - * - * @param {array} [parameters.passwordCredentials] A collection of - * PasswordCredential objects - * - * @param {string} [parameters.publisherName] The display name of the tenant in - * which the associated application is specified. + * @param {array} [parameters.keyCredentials] The collection of key credentials + * associated with the service principal. * - * @param {array} [parameters.replyUrls] A collection of reply URLs for the - * service principal. + * @param {array} [parameters.passwordCredentials] The collection of password + * credentials associated with the service principal. * - * @param {string} [parameters.samlMetadataUrl] + * @param {string} [parameters.servicePrincipalType] the type of the servie + * principal * - * @param {array} [parameters.servicePrincipalNames] A collection of service - * principal names. + * @param {string} [parameters.accountEnabled] whether or not the service + * principal account is enabled * - * @param {array} [parameters.tags] + * @param {array} [parameters.tags] Optional list of tags that you can apply to + * your service principals. Not nullable. * * @param {object} [options] Optional Parameters. * diff --git a/lib/services/graphManagement/package.json b/lib/services/graphManagement/package.json index 206a3b5b38..2242630873 100644 --- a/lib/services/graphManagement/package.json +++ b/lib/services/graphManagement/package.json @@ -22,4 +22,4 @@ "bugs": { "url": "https://github.com/azure/azure-sdk-for-node/issues" } -} \ No newline at end of file +}