cli-microsoft365 icon indicating copy to clipboard operation
cli-microsoft365 copied to clipboard

Align `spe containertype` commands output

Open milanholemans opened this issue 9 months ago • 1 comments

When looking to the multiple spe containertype commands, some have a response like below:

{
  "AzureSubscriptionId": "f08575e2-36c4-407f-a891-eabae23f66bc",
  "ContainerTypeId": "c33cfee5-c9b6-0a2a-02ee-060693a57f37",
  "CreationDate": "3/11/2024 2:38:56 PM",
  "DisplayName": "standard container",
  "ExpiryDate": null,
  "IsBillingProfileRequired": true,
  "OwningAppId": "1b3b8660-9a44-4a7c-9c02-657f3ff5d5ac",
  "OwningTenantId": "e1dd4023-a656-480a-8a0e-c1b1eec51e1d",
  "Region": "West Europe",
  "ResourceGroup": "Standard group",
  "SPContainerTypeBillingClassification": "Standard"
}

Others have a response that look like this:

{
  "_ObjectType_": "Microsoft.Online.SharePoint.TenantAdministration.SPContainerTypeProperties",
  "ApplicationRedirectUrl": null,
  "AzureSubscriptionId": "/Guid(00000000-0000-0000-0000-000000000000)/",
  "ContainerTypeId": "/Guid(073269af-f1d2-042d-2ef5-5bdd6ac83115)/",
  "CreationDate": null,
  "DisplayName": "test1",
  "ExpiryDate": null,
  "IsBillingProfileRequired": true,
  "OwningAppId": "/Guid(df4085cc-9a38-4255-badc-5c5225610475)/",
  "OwningTenantId": "/Guid(00000000-0000-0000-0000-000000000000)/",
  "Region": null,
  "ResourceGroup": null,
  "SPContainerTypeBillingClassification": 0
}

As you can see, we treat GUIDs differently in different commands. In some we return the CSOM structured GUID, in other commands we transform them to regular GUIDs.

I suggest that we update the following commands so they return a regular GUID instead of a CSOM structured GUID:

  • [ ] spe containertype get
  • [ ] spe containertype list

Hint: PR #6674 adds a formatting util to transform a CSOM GUID into a regular GUID.

milanholemans avatar Apr 04 '25 22:04 milanholemans

Good idea 👍

Adam-it avatar Apr 06 '25 05:04 Adam-it

Since this issue will likely be solved by #6840, let's close it.

milanholemans avatar Aug 22 '25 23:08 milanholemans