@pnp/cli-microsoft365 7.5.0 → 7.6.0-beta.480812d

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (209) hide show
  1. package/.eslintrc.cjs +3 -0
  2. package/README.md +1 -1
  3. package/allCommands.json +1 -1
  4. package/allCommandsFull.json +1 -1
  5. package/dist/Auth.js +12 -10
  6. package/dist/AuthServer.js +1 -1
  7. package/dist/cli/cli.js +1 -1
  8. package/dist/config.js +2 -2
  9. package/dist/m365/app/commands/app-get.js +1 -1
  10. package/dist/m365/app/commands/app-open.js +1 -1
  11. package/dist/m365/app/commands/permission/permission-add.js +2 -2
  12. package/dist/m365/app/commands/permission/permission-list.js +2 -2
  13. package/dist/m365/cli/commands/cli-consent.js +2 -2
  14. package/dist/m365/cli/commands/cli-reconsent.js +3 -3
  15. package/dist/m365/commands/login.js +1 -1
  16. package/dist/m365/entra/commands/administrativeunit/administrativeunit-add.js +1 -0
  17. package/dist/m365/entra/commands/administrativeunit/administrativeunit-get.js +1 -0
  18. package/dist/m365/entra/commands/administrativeunit/administrativeunit-list.js +1 -0
  19. package/dist/m365/entra/commands/administrativeunit/administrativeunit-member-add.js +1 -0
  20. package/dist/m365/entra/commands/administrativeunit/administrativeunit-member-get.js +1 -0
  21. package/dist/m365/entra/commands/administrativeunit/administrativeunit-member-list.js +1 -0
  22. package/dist/m365/entra/commands/administrativeunit/administrativeunit-remove.js +1 -0
  23. package/dist/m365/entra/commands/app/app-add.js +7 -6
  24. package/dist/m365/entra/commands/app/app-get.js +4 -3
  25. package/dist/m365/entra/commands/app/app-list.js +1 -0
  26. package/dist/m365/entra/commands/app/app-permission-add.js +3 -2
  27. package/dist/m365/entra/commands/app/app-permission-list.js +1 -1
  28. package/dist/m365/entra/commands/app/app-remove.js +5 -4
  29. package/dist/m365/entra/commands/app/app-role-add.js +6 -5
  30. package/dist/m365/entra/commands/app/app-role-list.js +4 -3
  31. package/dist/m365/entra/commands/app/app-role-remove.js +6 -5
  32. package/dist/m365/entra/commands/app/app-set.js +8 -7
  33. package/dist/m365/entra/commands/approleassignment/approleassignment-add.js +2 -1
  34. package/dist/m365/entra/commands/approleassignment/approleassignment-list.js +1 -0
  35. package/dist/m365/entra/commands/approleassignment/approleassignment-remove.js +1 -0
  36. package/dist/m365/entra/commands/enterpriseapp/enterpriseapp-add.js +1 -0
  37. package/dist/m365/entra/commands/enterpriseapp/enterpriseapp-get.js +1 -0
  38. package/dist/m365/entra/commands/enterpriseapp/enterpriseapp-list.js +1 -0
  39. package/dist/m365/entra/commands/group/group-get.js +1 -0
  40. package/dist/m365/entra/commands/group/group-list.js +1 -0
  41. package/dist/m365/entra/commands/group/group-remove.js +1 -0
  42. package/dist/m365/entra/commands/group/group-user-list.js +1 -0
  43. package/dist/m365/entra/commands/groupsetting/groupsetting-add.js +1 -0
  44. package/dist/m365/entra/commands/groupsetting/groupsetting-get.js +1 -0
  45. package/dist/m365/entra/commands/groupsetting/groupsetting-list.js +1 -0
  46. package/dist/m365/entra/commands/groupsetting/groupsetting-remove.js +1 -0
  47. package/dist/m365/entra/commands/groupsetting/groupsetting-set.js +1 -0
  48. package/dist/m365/entra/commands/groupsettingtemplate/groupsettingtemplate-get.js +1 -0
  49. package/dist/m365/entra/commands/groupsettingtemplate/groupsettingtemplate-list.js +1 -0
  50. package/dist/m365/entra/commands/license/license-list.js +1 -0
  51. package/dist/m365/entra/commands/m365group/m365group-add.js +1 -0
  52. package/dist/m365/entra/commands/m365group/m365group-conversation-list.js +1 -0
  53. package/dist/m365/entra/commands/m365group/m365group-conversation-post-list.js +1 -0
  54. package/dist/m365/entra/commands/m365group/m365group-get.js +1 -0
  55. package/dist/m365/entra/commands/m365group/m365group-list.js +1 -0
  56. package/dist/m365/entra/commands/m365group/m365group-recyclebinitem-clear.js +1 -0
  57. package/dist/m365/entra/commands/m365group/m365group-recyclebinitem-list.js +1 -0
  58. package/dist/m365/entra/commands/m365group/m365group-recyclebinitem-remove.js +1 -0
  59. package/dist/m365/entra/commands/m365group/m365group-recyclebinitem-restore.js +1 -0
  60. package/dist/m365/entra/commands/m365group/m365group-remove.js +1 -0
  61. package/dist/m365/entra/commands/m365group/m365group-renew.js +1 -0
  62. package/dist/m365/entra/commands/m365group/m365group-set.js +1 -0
  63. package/dist/m365/entra/commands/m365group/m365group-teamify.js +1 -0
  64. package/dist/m365/entra/commands/m365group/m365group-user-add.js +1 -0
  65. package/dist/m365/entra/commands/m365group/m365group-user-list.js +1 -0
  66. package/dist/m365/entra/commands/m365group/m365group-user-remove.js +1 -0
  67. package/dist/m365/entra/commands/m365group/m365group-user-set.js +1 -0
  68. package/dist/m365/entra/commands/oauth2grant/oauth2grant-add.js +1 -0
  69. package/dist/m365/entra/commands/oauth2grant/oauth2grant-list.js +1 -0
  70. package/dist/m365/entra/commands/oauth2grant/oauth2grant-remove.js +1 -0
  71. package/dist/m365/entra/commands/oauth2grant/oauth2grant-set.js +1 -0
  72. package/dist/m365/entra/commands/policy/policy-list.js +1 -0
  73. package/dist/m365/entra/commands/siteclassification/siteclassification-disable.js +1 -0
  74. package/dist/m365/entra/commands/siteclassification/siteclassification-enable.js +1 -0
  75. package/dist/m365/entra/commands/siteclassification/siteclassification-get.js +1 -0
  76. package/dist/m365/entra/commands/siteclassification/siteclassification-set.js +1 -0
  77. package/dist/m365/entra/commands/user/user-add.js +1 -0
  78. package/dist/m365/entra/commands/user/user-get.js +1 -0
  79. package/dist/m365/entra/commands/user/user-guest-add.js +1 -0
  80. package/dist/m365/entra/commands/user/user-hibp.js +1 -0
  81. package/dist/m365/entra/commands/user/user-license-add.js +1 -0
  82. package/dist/m365/entra/commands/user/user-license-list.js +1 -0
  83. package/dist/m365/entra/commands/user/user-license-remove.js +1 -0
  84. package/dist/m365/entra/commands/user/user-list.js +1 -0
  85. package/dist/m365/entra/commands/user/user-password-validate.js +1 -0
  86. package/dist/m365/entra/commands/user/user-recyclebinitem-clear.js +1 -0
  87. package/dist/m365/entra/commands/user/user-recyclebinitem-list.js +1 -0
  88. package/dist/m365/entra/commands/user/user-recyclebinitem-remove.js +2 -1
  89. package/dist/m365/entra/commands/user/user-recyclebinitem-restore.js +1 -0
  90. package/dist/m365/entra/commands/user/user-remove.js +1 -0
  91. package/dist/m365/entra/commands/user/user-set.js +1 -0
  92. package/dist/m365/entra/commands/user/user-signin-list.js +1 -0
  93. package/dist/m365/outlook/commands/message/message-remove.js +113 -0
  94. package/dist/m365/outlook/commands.js +1 -0
  95. package/dist/m365/pp/commands/managementapp/managementapp-add.js +7 -7
  96. package/dist/m365/purview/commands/threatassessment/threatassessment-add.js +123 -0
  97. package/dist/m365/purview/commands/threatassessment/threatassessment-list.js +104 -0
  98. package/dist/m365/purview/commands.js +3 -1
  99. package/dist/m365/spfx/commands/project/DeployWorkflow.js +111 -0
  100. package/dist/m365/spfx/commands/project/project-azuredevops-pipeline-add.js +183 -0
  101. package/dist/m365/spfx/commands/project/project-azuredevops-pipeline-model.js +2 -0
  102. package/dist/m365/spfx/commands/project/project-github-workflow-add.js +3 -4
  103. package/dist/m365/spfx/commands.js +1 -0
  104. package/dist/m365/spo/commands/folder/FolderColor.js +19 -0
  105. package/dist/m365/spo/commands/folder/folder-add.js +46 -17
  106. package/dist/m365/spo/commands/folder/folder-set.js +118 -0
  107. package/dist/m365/spo/commands/group/group-member-add.js +2 -2
  108. package/dist/m365/spo/commands/group/group-member-remove.js +1 -1
  109. package/dist/m365/spo/commands/site/site-apppermission-add.js +2 -2
  110. package/dist/m365/spo/commands/site/site-recyclebinitem-restore.js +66 -27
  111. package/dist/m365/spo/commands/tenant/tenant-settings-set.js +1 -1
  112. package/dist/m365/spo/commands/user/user-remove.js +93 -16
  113. package/dist/m365/spo/commands.js +1 -0
  114. package/dist/m365/teams/commands/tab/tab-get.js +1 -1
  115. package/dist/utils/spo.js +1 -1
  116. package/docs/docs/cmd/app/app-get.mdx +10 -10
  117. package/docs/docs/cmd/app/app-open.mdx +6 -6
  118. package/docs/docs/cmd/app/permission/permission-add.mdx +2 -2
  119. package/docs/docs/cmd/app/permission/permission-list.mdx +5 -5
  120. package/docs/docs/cmd/cli/cli-consent.mdx +2 -2
  121. package/docs/docs/cmd/cli/cli-reconsent.mdx +6 -6
  122. package/docs/docs/cmd/entra/app/app-permission-add.mdx +6 -6
  123. package/docs/docs/cmd/entra/approleassignment/approleassignment-add.mdx +1 -1
  124. package/docs/docs/cmd/entra/approleassignment/approleassignment-list.mdx +4 -4
  125. package/docs/docs/cmd/entra/enterpriseapp/enterpriseapp-add.mdx +1 -1
  126. package/docs/docs/cmd/entra/enterpriseapp/enterpriseapp-get.mdx +1 -1
  127. package/docs/docs/cmd/entra/group/group-user-add.mdx +7 -7
  128. package/docs/docs/cmd/entra/oauth2grant/oauth2grant-add.mdx +1 -1
  129. package/docs/docs/cmd/entra/oauth2grant/oauth2grant-list.mdx +1 -1
  130. package/docs/docs/cmd/entra/oauth2grant/oauth2grant-remove.mdx +1 -1
  131. package/docs/docs/cmd/entra/oauth2grant/oauth2grant-set.mdx +1 -1
  132. package/docs/docs/cmd/external/connection/connection-add.mdx +2 -2
  133. package/docs/docs/cmd/file/file-add.mdx +1 -1
  134. package/docs/docs/cmd/graph/schemaextension/schemaextension-add.mdx +2 -2
  135. package/docs/docs/cmd/graph/schemaextension/schemaextension-set.mdx +1 -1
  136. package/docs/docs/cmd/login.mdx +18 -18
  137. package/docs/docs/cmd/outlook/message/message-remove.mdx +67 -0
  138. package/docs/docs/cmd/pa/app/app-owner-set.mdx +1 -1
  139. package/docs/docs/cmd/pa/app/app-permission-ensure.mdx +3 -3
  140. package/docs/docs/cmd/pa/app/app-permission-remove.mdx +3 -3
  141. package/docs/docs/cmd/planner/plan/plan-add.mdx +1 -1
  142. package/docs/docs/cmd/planner/roster/roster-add.mdx +5 -5
  143. package/docs/docs/cmd/planner/roster/roster-get.mdx +7 -7
  144. package/docs/docs/cmd/planner/roster/roster-member-add.mdx +4 -4
  145. package/docs/docs/cmd/planner/roster/roster-member-get.mdx +4 -4
  146. package/docs/docs/cmd/planner/roster/roster-member-list.mdx +2 -2
  147. package/docs/docs/cmd/planner/roster/roster-member-remove.mdx +5 -5
  148. package/docs/docs/cmd/planner/roster/roster-plan-list.mdx +1 -1
  149. package/docs/docs/cmd/planner/roster/roster-remove.mdx +2 -2
  150. package/docs/docs/cmd/planner/task/task-add.mdx +1 -1
  151. package/docs/docs/cmd/planner/task/task-get.mdx +1 -1
  152. package/docs/docs/cmd/planner/task/task-list.mdx +1 -1
  153. package/docs/docs/cmd/planner/task/task-remove.mdx +1 -1
  154. package/docs/docs/cmd/planner/task/task-set.mdx +1 -1
  155. package/docs/docs/cmd/pp/environment/environment-get.mdx +1 -1
  156. package/docs/docs/cmd/pp/environment/environment-list.mdx +1 -1
  157. package/docs/docs/cmd/pp/managementapp/managementapp-add.mdx +9 -9
  158. package/docs/docs/cmd/purview/auditlog/auditlog-list.mdx +1 -1
  159. package/docs/docs/cmd/purview/sensitivitylabel/sensitivitylabel-get.mdx +1 -1
  160. package/docs/docs/cmd/purview/sensitivitylabel/sensitivitylabel-list.mdx +1 -1
  161. package/docs/docs/cmd/purview/sensitivitylabel/sensitivitylabel-policysettings-list.mdx +1 -1
  162. package/docs/docs/cmd/purview/threatassessment/threatassessment-add.mdx +131 -0
  163. package/docs/docs/cmd/purview/threatassessment/threatassessment-list.mdx +110 -0
  164. package/docs/docs/cmd/request.mdx +1 -1
  165. package/docs/docs/cmd/spfx/project/project-azuredevops-pipeline-add.mdx +87 -0
  166. package/docs/docs/cmd/spfx/project/project-github-workflow-add.mdx +2 -2
  167. package/docs/docs/cmd/spo/file/file-roleassignment-add.mdx +3 -3
  168. package/docs/docs/cmd/spo/file/file-roleassignment-remove.mdx +2 -2
  169. package/docs/docs/cmd/spo/folder/folder-add.mdx +38 -0
  170. package/docs/docs/cmd/spo/folder/folder-roleassignment-add.mdx +1 -1
  171. package/docs/docs/cmd/spo/folder/folder-roleassignment-remove.mdx +1 -1
  172. package/docs/docs/cmd/spo/folder/folder-set.mdx +88 -0
  173. package/docs/docs/cmd/spo/group/group-member-add.mdx +2 -2
  174. package/docs/docs/cmd/spo/group/group-member-remove.mdx +3 -3
  175. package/docs/docs/cmd/spo/list/list-roleassignment-add.mdx +3 -3
  176. package/docs/docs/cmd/spo/list/list-roleassignment-remove.mdx +2 -2
  177. package/docs/docs/cmd/spo/listitem/listitem-roleassignment-add.mdx +8 -8
  178. package/docs/docs/cmd/spo/listitem/listitem-roleassignment-remove.mdx +2 -2
  179. package/docs/docs/cmd/spo/site/site-apppermission-add.mdx +2 -2
  180. package/docs/docs/cmd/spo/site/site-apppermission-set.mdx +2 -2
  181. package/docs/docs/cmd/spo/site/site-recyclebinitem-restore.mdx +29 -5
  182. package/docs/docs/cmd/spo/tenant/tenant-settings-set.mdx +89 -89
  183. package/docs/docs/cmd/spo/user/user-ensure.mdx +1 -1
  184. package/docs/docs/cmd/spo/user/user-remove.mdx +40 -9
  185. package/docs/docs/cmd/spo/web/web-roleassignment-add.mdx +3 -3
  186. package/docs/docs/cmd/spo/web/web-roleassignment-remove.mdx +2 -2
  187. package/docs/docs/cmd/teams/channel/channel-member-remove.mdx +1 -1
  188. package/docs/docs/cmd/teams/channel/channel-member-set.mdx +1 -1
  189. package/docs/docs/cmd/teams/chat/chat-member-remove.mdx +3 -3
  190. package/docs/docs/cmd/teams/report/report-directroutingcalls.mdx +1 -1
  191. package/docs/docs/cmd/teams/report/report-pstncalls.mdx +1 -1
  192. package/docs/docs/cmd/teams/tab/tab-get.mdx +19 -12
  193. package/docs/docs/cmd/tenant/security/security-alerts-list.mdx +1 -1
  194. package/docs/docs/cmd/viva/engage/engage-group-list.mdx +1 -1
  195. package/docs/docs/cmd/viva/engage/engage-group-user-add.mdx +1 -1
  196. package/docs/docs/cmd/viva/engage/engage-group-user-remove.mdx +1 -1
  197. package/docs/docs/cmd/viva/engage/engage-message-add.mdx +1 -1
  198. package/docs/docs/cmd/viva/engage/engage-message-get.mdx +1 -1
  199. package/docs/docs/cmd/viva/engage/engage-message-like-set.mdx +1 -1
  200. package/docs/docs/cmd/viva/engage/engage-message-list.mdx +1 -1
  201. package/docs/docs/cmd/viva/engage/engage-message-remove.mdx +1 -1
  202. package/docs/docs/cmd/viva/engage/engage-network-list.mdx +1 -1
  203. package/docs/docs/cmd/viva/engage/engage-search.mdx +1 -1
  204. package/docs/docs/cmd/viva/engage/engage-user-get.mdx +1 -1
  205. package/docs/docs/cmd/viva/engage/engage-user-list.mdx +1 -1
  206. package/npm-shrinkwrap.json +64 -60
  207. package/package.json +12 -12
  208. package/dist/m365/spo/commands/folder/folder-rename.js +0 -72
  209. package/docs/docs/cmd/spo/folder/folder-rename.mdx +0 -44
package/dist/Auth.js CHANGED
@@ -24,7 +24,7 @@ export class Connection {
24
24
  this.certificateType = CertificateType.Unknown;
25
25
  this.cloudType = CloudType.Public;
26
26
  this.accessTokens = {};
27
- this.appId = config.cliAadAppId;
27
+ this.appId = config.cliEntraAppId;
28
28
  this.tenant = config.tenant;
29
29
  this.cloudType = CloudType.Public;
30
30
  }
@@ -44,7 +44,7 @@ export class Connection {
44
44
  this.thumbprint = undefined;
45
45
  this.spoUrl = undefined;
46
46
  this.spoTenantId = undefined;
47
- this.appId = config.cliAadAppId;
47
+ this.appId = config.cliEntraAppId;
48
48
  this.tenant = config.tenant;
49
49
  }
50
50
  }
@@ -144,7 +144,7 @@ export class Auth {
144
144
  else {
145
145
  if (debug) {
146
146
  if (!accessToken) {
147
- await logger.logToStderr(`No token found for resource ${resource}`);
147
+ await logger.logToStderr(`No token found for resource ${resource}.`);
148
148
  }
149
149
  else {
150
150
  await logger.logToStderr(`Access token expired. Token: ${accessToken.accessToken}, ExpiresAt: ${accessToken.expiresOn}`);
@@ -193,9 +193,9 @@ export class Auth {
193
193
  const response = await getTokenPromise(resource, logger, debug, fetchNew);
194
194
  if (!response) {
195
195
  if (debug) {
196
- await logger.logToStderr(`getTokenPromise authentication result is null`);
196
+ await logger.logToStderr('getTokenPromise authentication result is null.');
197
197
  }
198
- throw `Failed to retrieve an access token. Please try again`;
198
+ throw 'Failed to retrieve an access token. Please try again.';
199
199
  }
200
200
  else {
201
201
  if (debug) {
@@ -387,7 +387,7 @@ export class Auth {
387
387
  scopes: [`${resource}/.default`]
388
388
  });
389
389
  }
390
- async ensureAccessTokenWithCertificate(resource, logger, debug) {
390
+ async ensureAccessTokenWithCertificate(resource, logger, debug, fetchNew) {
391
391
  const nodeForge = (await import('node-forge')).default;
392
392
  const { pem, pki, asn1, pkcs12 } = nodeForge;
393
393
  if (debug) {
@@ -442,7 +442,8 @@ export class Auth {
442
442
  }
443
443
  this.clientApplication = await this.getConfidentialClient(logger, debug, this.connection.thumbprint, cert);
444
444
  return this.clientApplication.acquireTokenByClientCredential({
445
- scopes: [`${resource}/.default`]
445
+ scopes: [`${resource}/.default`],
446
+ skipCache: fetchNew
446
447
  });
447
448
  }
448
449
  async ensureAccessTokenWithIdentity(resource, logger, debug) {
@@ -562,10 +563,11 @@ export class Auth {
562
563
  }
563
564
  }
564
565
  }
565
- async ensureAccessTokenWithSecret(resource, logger, debug) {
566
+ async ensureAccessTokenWithSecret(resource, logger, debug, fetchNew) {
566
567
  this.clientApplication = await this.getConfidentialClient(logger, debug, undefined, undefined, this.connection.secret);
567
568
  return this.clientApplication.acquireTokenByClientCredential({
568
- scopes: [`${resource}/.default`]
569
+ scopes: [`${resource}/.default`],
570
+ skipCache: fetchNew
569
571
  });
570
572
  }
571
573
  async calculateThumbprint(certificate) {
@@ -579,7 +581,7 @@ export class Auth {
579
581
  let resource = url;
580
582
  const pos = resource.indexOf('/', 8);
581
583
  if (pos > -1) {
582
- resource = resource.substr(0, pos);
584
+ resource = resource.substring(0, pos);
583
585
  }
584
586
  if (resource === 'https://api.bap.microsoft.com' ||
585
587
  resource === 'https://api.powerapps.com' ||
@@ -54,7 +54,7 @@ export class AuthServer {
54
54
  error: queryString.error,
55
55
  errorDescription: queryString.error_description
56
56
  };
57
- body = "<p>Oops! Azure Active Directory replied with an error message.</p>";
57
+ body = "<p>Oops! Microsoft Entra ID replied with an error message.</p>";
58
58
  body += `<p>${errorMessage.error}</p>`;
59
59
  if (errorMessage.errorDescription !== undefined) {
60
60
  body += `<p>${errorMessage.errorDescription}</p>`;
package/dist/cli/cli.js CHANGED
@@ -98,7 +98,7 @@ async function execute(rawArgs) {
98
98
  if (parsedArgs.output !== 'none') {
99
99
  printHelp(await getHelpMode(parsedArgs));
100
100
  }
101
- return Promise.resolve();
101
+ return;
102
102
  }
103
103
  delete cli.optionsFromArgs.options._;
104
104
  delete cli.optionsFromArgs.options['--'];
package/dist/config.js CHANGED
@@ -1,9 +1,9 @@
1
1
  import { app } from "./utils/app.js";
2
- const cliAadAppId = '31359c7f-bd7e-475c-86db-fdb8c937548e';
2
+ const cliEntraAppId = '31359c7f-bd7e-475c-86db-fdb8c937548e';
3
3
  export default {
4
4
  applicationName: `CLI for Microsoft 365 v${app.packageJson().version}`,
5
5
  delimiter: 'm365\$',
6
- cliAadAppId: process.env.CLIMICROSOFT365_AADAPPID || cliAadAppId,
6
+ cliEntraAppId: process.env.CLIMICROSOFT365_ENTRAAPPID || process.env.CLIMICROSOFT365_AADAPPID || cliEntraAppId,
7
7
  tenant: process.env.CLIMICROSOFT365_TENANT || 'common',
8
8
  configstoreName: 'cli-m365-config'
9
9
  };
@@ -7,7 +7,7 @@ class AppGetCommand extends AppCommand {
7
7
  return commands.GET;
8
8
  }
9
9
  get description() {
10
- return 'Retrieves information about the current Azure AD app';
10
+ return 'Retrieves information about the current Microsoft Entra app';
11
11
  }
12
12
  async commandAction(logger, args) {
13
13
  const options = {
@@ -14,7 +14,7 @@ class AppOpenCommand extends AppCommand {
14
14
  return commands.OPEN;
15
15
  }
16
16
  get description() {
17
- return 'Opens Azure AD app in the Azure AD portal';
17
+ return 'Opens Microsoft Entra app in the Microsoft Entra ID portal';
18
18
  }
19
19
  constructor() {
20
20
  super();
@@ -19,7 +19,7 @@ class AppPermissionAddCommand extends AppCommand {
19
19
  return commands.PERMISSION_ADD;
20
20
  }
21
21
  get description() {
22
- return 'Adds the specified application and/or delegated permissions to the current AAD app API permissions';
22
+ return 'Adds the specified application and/or delegated permissions to the current Microsoft Entra app API permissions';
23
23
  }
24
24
  constructor() {
25
25
  super();
@@ -64,7 +64,7 @@ class AppPermissionAddCommand extends AppCommand {
64
64
  async getAppObject() {
65
65
  const apps = await odata.getAllItems(`${this.resource}/v1.0/myorganization/applications?$filter=appId eq '${formatting.encodeQueryParameter(this.appId)}'&$select=id,requiredResourceAccess`);
66
66
  if (apps.length === 0) {
67
- throw `App with id ${this.appId} not found in Azure Active Directory`;
67
+ throw `App with id ${this.appId} not found in Microsoft Entra ID.`;
68
68
  }
69
69
  return apps[0];
70
70
  }
@@ -13,7 +13,7 @@ class AppPermissionListCommand extends AppCommand {
13
13
  return commands.PERMISSION_LIST;
14
14
  }
15
15
  get description() {
16
- return 'Lists API permissions for the current AAD app';
16
+ return 'Lists API permissions for the current Microsoft Entra app';
17
17
  }
18
18
  async commandAction(logger) {
19
19
  try {
@@ -178,7 +178,7 @@ class AppPermissionListCommand extends AppCommand {
178
178
  }
179
179
  async getAppRegistration(appId, logger) {
180
180
  if (this.verbose) {
181
- await logger.logToStderr(`Retrieving Azure AD application registration ${appId}`);
181
+ await logger.logToStderr(`Retrieving Microsoft Entra application registration ${appId}`);
182
182
  }
183
183
  const options = {
184
184
  appId: appId,
@@ -12,7 +12,7 @@ class CliConsentCommand extends AnonymousCommand {
12
12
  return commands.CONSENT;
13
13
  }
14
14
  get description() {
15
- return 'Consent additional permissions for the Azure AD application used by the CLI for Microsoft 365';
15
+ return 'Consent additional permissions for the Microsoft Entra application used by the CLI for Microsoft 365';
16
16
  }
17
17
  constructor() {
18
18
  super();
@@ -30,7 +30,7 @@ class CliConsentCommand extends AnonymousCommand {
30
30
  scope = 'https://api.yammer.com/user_impersonation';
31
31
  break;
32
32
  }
33
- await logger.log(`To consent permissions for executing ${args.options.service} commands, navigate in your web browser to https://login.microsoftonline.com/${config.tenant}/oauth2/v2.0/authorize?client_id=${config.cliAadAppId}&response_type=code&scope=${encodeURIComponent(scope)}`);
33
+ await logger.log(`To consent permissions for executing ${args.options.service} commands, navigate in your web browser to https://login.microsoftonline.com/${config.tenant}/oauth2/v2.0/authorize?client_id=${config.cliEntraAppId}&response_type=code&scope=${encodeURIComponent(scope)}`);
34
34
  }
35
35
  async action(logger, args) {
36
36
  this.initAction(args, logger);
@@ -9,12 +9,12 @@ class CliReconsentCommand extends AnonymousCommand {
9
9
  return commands.RECONSENT;
10
10
  }
11
11
  get description() {
12
- return 'Returns Azure AD URL to open in the browser to re-consent CLI for Microsoft 365 permissions';
12
+ return 'Returns URL to open in the browser to re-consent CLI for Microsoft 365 Microsoft Entra permissions';
13
13
  }
14
14
  async commandAction(logger) {
15
- const url = `https://login.microsoftonline.com/${config.tenant}/oauth2/authorize?client_id=${config.cliAadAppId}&response_type=code&prompt=admin_consent`;
15
+ const url = `https://login.microsoftonline.com/${config.tenant}/oauth2/authorize?client_id=${config.cliEntraAppId}&response_type=code&prompt=admin_consent`;
16
16
  if (cli.getSettingWithDefaultValue(settingsNames.autoOpenLinksInBrowser, false) === false) {
17
- await logger.log(`To re-consent the PnP Microsoft 365 Management Shell Azure AD application navigate in your web browser to ${url}`);
17
+ await logger.log(`To re-consent the PnP Microsoft 365 Management Shell Microsoft Entra application navigate in your web browser to ${url}`);
18
18
  return;
19
19
  }
20
20
  await logger.log(`Opening the following page in your browser: ${url}`);
@@ -37,7 +37,7 @@ class LoginCommand extends Command {
37
37
  await logger.logToStderr(`Signing in to Microsoft 365...`);
38
38
  }
39
39
  const authType = args.options.authType || cli.getSettingWithDefaultValue(settingsNames.authType, 'deviceCode');
40
- auth.connection.appId = args.options.appId || config.cliAadAppId;
40
+ auth.connection.appId = args.options.appId || config.cliEntraAppId;
41
41
  auth.connection.tenant = args.options.tenant || config.tenant;
42
42
  auth.connection.name = args.options.connectionName;
43
43
  switch (authType) {
@@ -25,6 +25,7 @@ class EntraAdministrativeUnitAddCommand extends GraphCommand {
25
25
  __classPrivateFieldGet(this, _EntraAdministrativeUnitAddCommand_instances, "m", _EntraAdministrativeUnitAddCommand_initOptions).call(this);
26
26
  }
27
27
  async commandAction(logger, args) {
28
+ await this.showDeprecationWarning(logger, aadCommands.ADMINISTRATIVEUNIT_ADD, commands.ADMINISTRATIVEUNIT_ADD);
28
29
  const requestOptions = {
29
30
  url: `${this.resource}/v1.0/directory/administrativeUnits`,
30
31
  headers: {
@@ -30,6 +30,7 @@ class EntraAdministrativeUnitGetCommand extends GraphCommand {
30
30
  __classPrivateFieldGet(this, _EntraAdministrativeUnitGetCommand_instances, "m", _EntraAdministrativeUnitGetCommand_initTypes).call(this);
31
31
  }
32
32
  async commandAction(logger, args) {
33
+ await this.showDeprecationWarning(logger, aadCommands.ADMINISTRATIVEUNIT_GET, commands.ADMINISTRATIVEUNIT_GET);
33
34
  let administrativeUnit;
34
35
  try {
35
36
  if (args.options.id) {
@@ -16,6 +16,7 @@ class EntraAdministrativeUnitListCommand extends GraphCommand {
16
16
  return ['id', 'displayName', 'visibility'];
17
17
  }
18
18
  async commandAction(logger) {
19
+ await this.showDeprecationWarning(logger, aadCommands.ADMINISTRATIVEUNIT_LIST, commands.ADMINISTRATIVEUNIT_LIST);
19
20
  try {
20
21
  const results = await odata.getAllItems(`${this.resource}/v1.0/directory/administrativeUnits`);
21
22
  await logger.log(results);
@@ -32,6 +32,7 @@ class EntraAdministrativeUnitMemberAddCommand extends GraphCommand {
32
32
  __classPrivateFieldGet(this, _EntraAdministrativeUnitMemberAddCommand_instances, "m", _EntraAdministrativeUnitMemberAddCommand_initOptionSets).call(this);
33
33
  }
34
34
  async commandAction(logger, args) {
35
+ await this.showDeprecationWarning(logger, aadCommands.ADMINISTRATIVEUNIT_MEMBER_ADD, commands.ADMINISTRATIVEUNIT_MEMBER_ADD);
35
36
  let administrativeUnitId = args.options.administrativeUnitId;
36
37
  let memberType;
37
38
  let memberId;
@@ -29,6 +29,7 @@ class EntraAdministrativeUnitMemberGetCommand extends GraphCommand {
29
29
  __classPrivateFieldGet(this, _EntraAdministrativeUnitMemberGetCommand_instances, "m", _EntraAdministrativeUnitMemberGetCommand_initOptionSets).call(this);
30
30
  }
31
31
  async commandAction(logger, args) {
32
+ await this.showDeprecationWarning(logger, aadCommands.ADMINISTRATIVEUNIT_MEMBER_GET, commands.ADMINISTRATIVEUNIT_MEMBER_GET);
32
33
  let administrativeUnitId = args.options.administrativeUnitId;
33
34
  try {
34
35
  if (args.options.administrativeUnitName) {
@@ -32,6 +32,7 @@ class EntraAdministrativeUnitMemberListCommand extends GraphCommand {
32
32
  __classPrivateFieldGet(this, _EntraAdministrativeUnitMemberListCommand_instances, "m", _EntraAdministrativeUnitMemberListCommand_initOptionSets).call(this);
33
33
  }
34
34
  async commandAction(logger, args) {
35
+ await this.showDeprecationWarning(logger, aadCommands.ADMINISTRATIVEUNIT_MEMBER_LIST, commands.ADMINISTRATIVEUNIT_MEMBER_LIST);
35
36
  let administrativeUnitId = args.options.administrativeUnitId;
36
37
  try {
37
38
  if (args.options.administrativeUnitName) {
@@ -31,6 +31,7 @@ class EntraAdministrativeUnitRemoveCommand extends GraphCommand {
31
31
  __classPrivateFieldGet(this, _EntraAdministrativeUnitRemoveCommand_instances, "m", _EntraAdministrativeUnitRemoveCommand_initTypes).call(this);
32
32
  }
33
33
  async commandAction(logger, args) {
34
+ await this.showDeprecationWarning(logger, aadCommands.ADMINISTRATIVEUNIT_REMOVE, commands.ADMINISTRATIVEUNIT_REMOVE);
34
35
  const removeAdministrativeUnit = async () => {
35
36
  try {
36
37
  let administrativeUnitId = args.options.id;
@@ -34,12 +34,13 @@ class EntraAppAddCommand extends GraphCommand {
34
34
  __classPrivateFieldGet(this, _EntraAppAddCommand_instances, "m", _EntraAppAddCommand_initOptionSets).call(this);
35
35
  }
36
36
  async commandAction(logger, args) {
37
+ await this.showDeprecationWarning(logger, aadCommands.APP_ADD, commands.APP_ADD);
37
38
  try {
38
39
  const apis = await this.resolveApis(args, logger);
39
40
  let appInfo = await this.createAppRegistration(args, apis, logger);
40
- // based on the assumption that we're adding AAD app to the current
41
+ // based on the assumption that we're adding Microsoft Entra app to the current
41
42
  // directory. If we in the future extend the command with allowing
42
- // users to create AAD app in a different directory, we'll need to
43
+ // users to create Microsoft Entra app in a different directory, we'll need to
43
44
  // adjust this
44
45
  appInfo.tenantId = accessToken.getTenantIdFromAccessToken(auth.connection.accessTokens[auth.defaultResource].accessToken);
45
46
  appInfo = await this.updateAppFromManifest(args, appInfo);
@@ -98,7 +99,7 @@ class EntraAppAddCommand extends GraphCommand {
98
99
  applicationInfo.keyCredentials = [newKeyCredential];
99
100
  }
100
101
  if (this.verbose) {
101
- await logger.logToStderr(`Creating Azure AD app registration...`);
102
+ await logger.logToStderr(`Creating Microsoft Entra app registration...`);
102
103
  }
103
104
  const createApplicationRequestOptions = {
104
105
  url: `${this.resource}/v1.0/myorganization/applications`,
@@ -390,7 +391,7 @@ class EntraAppAddCommand extends GraphCommand {
390
391
  return appInfo;
391
392
  }
392
393
  if (this.verbose) {
393
- await logger.logToStderr(`Configuring Azure AD application ID URI...`);
394
+ await logger.logToStderr(`Configuring Microsoft Entra application ID URI...`);
394
395
  }
395
396
  const applicationInfo = {};
396
397
  if (args.options.uri) {
@@ -544,7 +545,7 @@ class EntraAppAddCommand extends GraphCommand {
544
545
  return appInfo;
545
546
  }
546
547
  if (this.verbose) {
547
- await logger.logToStderr(`Configure Azure AD app secret...`);
548
+ await logger.logToStderr(`Configure Microsoft Entra app secret...`);
548
549
  }
549
550
  const secret = await this.createSecret({ appObjectId: appInfo.id });
550
551
  if (!appInfo.secrets) {
@@ -599,7 +600,7 @@ class EntraAppAddCommand extends GraphCommand {
599
600
  }
600
601
  const filePath = '.m365rc.json';
601
602
  if (this.verbose) {
602
- await logger.logToStderr(`Saving Azure AD app registration information to the ${filePath} file...`);
603
+ await logger.logToStderr(`Saving Microsoft Entra app registration information to the ${filePath} file...`);
603
604
  }
604
605
  let m365rc = {};
605
606
  if (fs.existsSync(filePath)) {
@@ -31,6 +31,7 @@ class EntraAppGetCommand extends GraphCommand {
31
31
  __classPrivateFieldGet(this, _EntraAppGetCommand_instances, "m", _EntraAppGetCommand_initOptionSets).call(this);
32
32
  }
33
33
  async commandAction(logger, args) {
34
+ await this.showDeprecationWarning(logger, aadCommands.APP_GET, commands.APP_GET);
34
35
  try {
35
36
  const appObjectId = await this.getAppObjectId(args);
36
37
  const appInfo = await this.getAppInfo(appObjectId);
@@ -62,10 +63,10 @@ class EntraAppGetCommand extends GraphCommand {
62
63
  }
63
64
  if (res.value.length === 0) {
64
65
  const applicationIdentifier = appId ? `ID ${appId}` : `name ${name}`;
65
- throw `No Azure AD application registration with ${applicationIdentifier} found`;
66
+ throw `No Microsoft Entra application registration with ${applicationIdentifier} found`;
66
67
  }
67
68
  const resultAsKeyValuePair = formatting.convertArrayToHashTable('id', res.value);
68
- const result = await cli.handleMultipleResultsFound(`Multiple Azure AD application registration with name '${name}' found.`, resultAsKeyValuePair);
69
+ const result = await cli.handleMultipleResultsFound(`Multiple Microsoft Entra application registrations with name '${name}' found.`, resultAsKeyValuePair);
69
70
  return result.id;
70
71
  }
71
72
  async getAppInfo(appObjectId) {
@@ -84,7 +85,7 @@ class EntraAppGetCommand extends GraphCommand {
84
85
  }
85
86
  const filePath = '.m365rc.json';
86
87
  if (this.verbose) {
87
- await logger.logToStderr(`Saving Azure AD app registration information to the ${filePath} file...`);
88
+ await logger.logToStderr(`Saving Microsoft Entra app registration information to the ${filePath} file...`);
88
89
  }
89
90
  let m365rc = {};
90
91
  if (fs.existsSync(filePath)) {
@@ -16,6 +16,7 @@ class EntraAppListCommand extends GraphCommand {
16
16
  return ['appId', 'id', 'displayName', "signInAudience"];
17
17
  }
18
18
  async commandAction(logger) {
19
+ await this.showDeprecationWarning(logger, aadCommands.APP_LIST, commands.APP_LIST);
19
20
  try {
20
21
  const results = await odata.getAllItems(`${this.resource}/v1.0/applications`);
21
22
  await logger.log(results);
@@ -20,7 +20,7 @@ class EntraAppPermissionAddCommand extends GraphCommand {
20
20
  return commands.APP_PERMISSION_ADD;
21
21
  }
22
22
  get description() {
23
- return 'Adds the specified application and/or delegated permissions to a specified Entra ID (Azure AD) app';
23
+ return 'Adds the specified application and/or delegated permissions to a specified Microsoft Entra app';
24
24
  }
25
25
  alias() {
26
26
  return [aadCommands.APP_PERMISSION_ADD, commands.APPREGISTRATION_PERMISSION_ADD];
@@ -34,6 +34,7 @@ class EntraAppPermissionAddCommand extends GraphCommand {
34
34
  __classPrivateFieldGet(this, _EntraAppPermissionAddCommand_instances, "m", _EntraAppPermissionAddCommand_initOptionSets).call(this);
35
35
  }
36
36
  async commandAction(logger, args) {
37
+ await this.showDeprecationWarning(logger, aadCommands.APP_PERMISSION_ADD, commands.APP_PERMISSION_ADD);
37
38
  try {
38
39
  const appObject = await this.getAppObject(args.options);
39
40
  const servicePrincipals = await this.getServicePrincipals();
@@ -71,7 +72,7 @@ class EntraAppPermissionAddCommand extends GraphCommand {
71
72
  ? await odata.getAllItems(`${this.resource}/v1.0/applications?$filter=id eq '${options.appObjectId}'&$select=id,appId,requiredResourceAccess`)
72
73
  : await odata.getAllItems(`${this.resource}/v1.0/applications?$filter=appId eq '${options.appId}'&$select=id,appId,requiredResourceAccess`);
73
74
  if (apps.length === 0) {
74
- throw `App with ${options.appObjectId ? 'object id' : 'client id'} ${options.appObjectId ? options.appObjectId : options.appId} not found in Entra ID (Azure AD)`;
75
+ throw `App with ${options.appObjectId ? 'object id' : 'client id'} ${options.appObjectId ? options.appObjectId : options.appId} not found in Microsoft Entra ID`;
75
76
  }
76
77
  return apps[0];
77
78
  }
@@ -49,7 +49,7 @@ class EntraAppPermissionListCommand extends GraphCommand {
49
49
  };
50
50
  const res = await request.get(requestOptions);
51
51
  if (res.value.length === 0) {
52
- throw `No Azure AD application registration with ID ${options.appId} found`;
52
+ throw `No Microsoft Entra application registration with ID ${options.appId} found`;
53
53
  }
54
54
  return res.value[0].id;
55
55
  }
@@ -30,11 +30,12 @@ class EntraAppRemoveCommand extends GraphCommand {
30
30
  __classPrivateFieldGet(this, _EntraAppRemoveCommand_instances, "m", _EntraAppRemoveCommand_initOptionSets).call(this);
31
31
  }
32
32
  async commandAction(logger, args) {
33
+ await this.showDeprecationWarning(logger, aadCommands.APP_REMOVE, commands.APP_REMOVE);
33
34
  const deleteApp = async () => {
34
35
  try {
35
36
  const objectId = await this.getObjectId(args, logger);
36
37
  if (this.verbose) {
37
- await logger.logToStderr(`Deleting Azure AD app ${objectId}...`);
38
+ await logger.logToStderr(`Deleting Microsoft Entra app ${objectId}...`);
38
39
  }
39
40
  const requestOptions = {
40
41
  url: `${this.resource}/v1.0/myorganization/applications/${objectId}`,
@@ -65,7 +66,7 @@ class EntraAppRemoveCommand extends GraphCommand {
65
66
  }
66
67
  const { appId, name } = args.options;
67
68
  if (this.verbose) {
68
- await logger.logToStderr(`Retrieving information about Azure AD app ${appId ? appId : name}...`);
69
+ await logger.logToStderr(`Retrieving information about Microsoft Entra app ${appId ? appId : name}...`);
69
70
  }
70
71
  const filter = appId ?
71
72
  `appId eq '${formatting.encodeQueryParameter(appId)}'` :
@@ -83,10 +84,10 @@ class EntraAppRemoveCommand extends GraphCommand {
83
84
  }
84
85
  if (res.value.length === 0) {
85
86
  const applicationIdentifier = appId ? `ID ${appId}` : `name ${name}`;
86
- throw `No Azure AD application registration with ${applicationIdentifier} found`;
87
+ throw `No Microsoft Entra application registration with ${applicationIdentifier} found`;
87
88
  }
88
89
  const resultAsKeyValuePair = formatting.convertArrayToHashTable('id', res.value);
89
- const result = await cli.handleMultipleResultsFound(`Multiple Azure AD application registration with name '${name}' found.`, resultAsKeyValuePair);
90
+ const result = await cli.handleMultipleResultsFound(`Multiple Microsoft Entra application registration with name '${name}' found.`, resultAsKeyValuePair);
90
91
  return result.id;
91
92
  }
92
93
  }
@@ -30,11 +30,12 @@ class EntraAppRoleAddCommand extends GraphCommand {
30
30
  __classPrivateFieldGet(this, _EntraAppRoleAddCommand_instances, "m", _EntraAppRoleAddCommand_initOptionSets).call(this);
31
31
  }
32
32
  async commandAction(logger, args) {
33
+ await this.showDeprecationWarning(logger, aadCommands.APP_ROLE_ADD, commands.APP_ROLE_ADD);
33
34
  try {
34
35
  const appId = await this.getAppObjectId(args, logger);
35
36
  const appInfo = await this.getAppInfo(appId, logger);
36
37
  if (this.verbose) {
37
- await logger.logToStderr(`Adding role ${args.options.name} to Azure AD app ${appInfo.id}...`);
38
+ await logger.logToStderr(`Adding role ${args.options.name} to Microsoft Entra app ${appInfo.id}...`);
38
39
  }
39
40
  const requestOptions = {
40
41
  url: `${this.resource}/v1.0/myorganization/applications/${appInfo.id}`,
@@ -60,7 +61,7 @@ class EntraAppRoleAddCommand extends GraphCommand {
60
61
  }
61
62
  async getAppInfo(appId, logger) {
62
63
  if (this.verbose) {
63
- await logger.logToStderr(`Retrieving information about roles for Azure AD app ${appId}...`);
64
+ await logger.logToStderr(`Retrieving information about roles for Microsoft Entra app ${appId}...`);
64
65
  }
65
66
  const requestOptions = {
66
67
  url: `${this.resource}/v1.0/myorganization/applications/${appId}?$select=id,appRoles`,
@@ -89,7 +90,7 @@ class EntraAppRoleAddCommand extends GraphCommand {
89
90
  }
90
91
  const { appId, appName } = args.options;
91
92
  if (this.verbose) {
92
- await logger.logToStderr(`Retrieving information about Azure AD app ${appId ? appId : appName}...`);
93
+ await logger.logToStderr(`Retrieving information about Microsoft Entra app ${appId ? appId : appName}...`);
93
94
  }
94
95
  const filter = appId ?
95
96
  `appId eq '${formatting.encodeQueryParameter(appId)}'` :
@@ -107,10 +108,10 @@ class EntraAppRoleAddCommand extends GraphCommand {
107
108
  }
108
109
  if (res.value.length === 0) {
109
110
  const applicationIdentifier = appId ? `ID ${appId}` : `name ${appName}`;
110
- throw `No Azure AD application registration with ${applicationIdentifier} found`;
111
+ throw `No Microsoft Entra application registration with ${applicationIdentifier} found`;
111
112
  }
112
113
  const resultAsKeyValuePair = formatting.convertArrayToHashTable('id', res.value);
113
- const result = await cli.handleMultipleResultsFound(`Multiple Azure AD application registration with name '${appName}' found.`, resultAsKeyValuePair);
114
+ const result = await cli.handleMultipleResultsFound(`Multiple Microsoft Entra application registrations with name '${appName}' found.`, resultAsKeyValuePair);
114
115
  return result.id;
115
116
  }
116
117
  }
@@ -32,6 +32,7 @@ class EntraAppRoleListCommand extends GraphCommand {
32
32
  return ['displayName', 'description', 'id'];
33
33
  }
34
34
  async commandAction(logger, args) {
35
+ await this.showDeprecationWarning(logger, aadCommands.APP_ROLE_LIST, commands.APP_ROLE_LIST);
35
36
  try {
36
37
  const objectId = await this.getAppObjectId(args, logger);
37
38
  const appRoles = await odata.getAllItems(`${this.resource}/v1.0/myorganization/applications/${objectId}/appRoles`);
@@ -47,7 +48,7 @@ class EntraAppRoleListCommand extends GraphCommand {
47
48
  }
48
49
  const { appId, appName } = args.options;
49
50
  if (this.verbose) {
50
- await logger.logToStderr(`Retrieving information about Azure AD app ${appId ? appId : appName}...`);
51
+ await logger.logToStderr(`Retrieving information about Microsoft Entra app ${appId ? appId : appName}...`);
51
52
  }
52
53
  const filter = appId ?
53
54
  `appId eq '${formatting.encodeQueryParameter(appId)}'` :
@@ -65,10 +66,10 @@ class EntraAppRoleListCommand extends GraphCommand {
65
66
  }
66
67
  if (res.value.length === 0) {
67
68
  const applicationIdentifier = appId ? `ID ${appId}` : `name ${appName}`;
68
- throw `No Azure AD application registration with ${applicationIdentifier} found`;
69
+ throw `No Microsoft Entra application registration with ${applicationIdentifier} found`;
69
70
  }
70
71
  const resultAsKeyValuePair = formatting.convertArrayToHashTable('id', res.value);
71
- const result = await cli.handleMultipleResultsFound(`Multiple Azure AD application registration with name '${appName}' found.`, resultAsKeyValuePair);
72
+ const result = await cli.handleMultipleResultsFound(`Multiple Microsoft Entra application registrations with name '${appName}' found.`, resultAsKeyValuePair);
72
73
  return result.id;
73
74
  }
74
75
  }
@@ -30,6 +30,7 @@ class EntraAppRoleRemoveCommand extends GraphCommand {
30
30
  __classPrivateFieldGet(this, _EntraAppRoleRemoveCommand_instances, "m", _EntraAppRoleRemoveCommand_initOptionSets).call(this);
31
31
  }
32
32
  async commandAction(logger, args) {
33
+ await this.showDeprecationWarning(logger, aadCommands.APP_ROLE_REMOVE, commands.APP_ROLE_REMOVE);
33
34
  const deleteAppRole = async () => {
34
35
  try {
35
36
  await this.processAppRoleDelete(logger, args);
@@ -53,7 +54,7 @@ class EntraAppRoleRemoveCommand extends GraphCommand {
53
54
  const aadApp = await this.getAadApp(appObjectId, logger);
54
55
  const appRoleDeleteIdentifierNameValue = args.options.name ? `name '${args.options.name}'` : (args.options.claim ? `claim '${args.options.claim}'` : `id '${args.options.id}'`);
55
56
  if (this.verbose) {
56
- await logger.logToStderr(`Deleting role with ${appRoleDeleteIdentifierNameValue} from Azure AD app ${aadApp.id}...`);
57
+ await logger.logToStderr(`Deleting role with ${appRoleDeleteIdentifierNameValue} from Microsoft Entra app ${aadApp.id}...`);
57
58
  }
58
59
  // Find the role search criteria provided by the user.
59
60
  const appRoleDeleteIdentifierProperty = args.options.name ? `displayName` : (args.options.claim ? `value` : `id`);
@@ -114,7 +115,7 @@ class EntraAppRoleRemoveCommand extends GraphCommand {
114
115
  }
115
116
  async getAadApp(appId, logger) {
116
117
  if (this.verbose) {
117
- await logger.logToStderr(`Retrieving app roles information for the Azure AD app ${appId}...`);
118
+ await logger.logToStderr(`Retrieving app roles information for the Microsoft Entra app ${appId}...`);
118
119
  }
119
120
  const requestOptions = {
120
121
  url: `${this.resource}/v1.0/myorganization/applications/${appId}?$select=id,appRoles`,
@@ -131,7 +132,7 @@ class EntraAppRoleRemoveCommand extends GraphCommand {
131
132
  }
132
133
  const { appId, appName } = args.options;
133
134
  if (this.verbose) {
134
- await logger.logToStderr(`Retrieving information about Azure AD app ${appId ? appId : appName}...`);
135
+ await logger.logToStderr(`Retrieving information about Microsoft Entra app ${appId ? appId : appName}...`);
135
136
  }
136
137
  const filter = appId ?
137
138
  `appId eq '${formatting.encodeQueryParameter(appId)}'` :
@@ -149,10 +150,10 @@ class EntraAppRoleRemoveCommand extends GraphCommand {
149
150
  }
150
151
  if (res.value.length === 0) {
151
152
  const applicationIdentifier = appId ? `ID ${appId}` : `name ${appName}`;
152
- throw `No Azure AD application registration with ${applicationIdentifier} found`;
153
+ throw `No Microsoft Entra application registration with ${applicationIdentifier} found`;
153
154
  }
154
155
  const resultAsKeyValuePair = formatting.convertArrayToHashTable('id', res.value);
155
- const result = (await cli.handleMultipleResultsFound(`Multiple Azure AD application registration with name '${appName}' found.`, resultAsKeyValuePair));
156
+ const result = (await cli.handleMultipleResultsFound(`Multiple Microsoft Entra application registrations with name '${appName}' found.`, resultAsKeyValuePair));
156
157
  return result.id;
157
158
  }
158
159
  }