Skip to content

Commit

Permalink
Adds 'componentProperties' option to 'spo spfx' commands. Closes #5975
Browse files Browse the repository at this point in the history
  • Loading branch information
milanholemans authored and Adam-it committed Aug 1, 2024
1 parent f5a9fed commit 34b170d
Show file tree
Hide file tree
Showing 17 changed files with 648 additions and 345 deletions.
121 changes: 85 additions & 36 deletions docs/docs/cmd/spo/applicationcustomizer/applicationcustomizer-get.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,9 @@ m365 spo applicationcustomizer get [options]

`-s, --scope [scope]`
: Scope of the application customizer. Allowed values: `Site`, `Web`, `All`. Defaults to `All`.

`-p, --clientSideComponentProperties`
: Only output the client-side component properties.
```

<Global />
Expand Down Expand Up @@ -59,102 +62,148 @@ Retrieves an application customizer by title available at the site scope.
m365 spo applicationcustomizer get --title "Some customizer" --webUrl https://contoso.sharepoint.com/sites/sales --scope site
```

Retrieves the client-side component properties of a application customizer.

```sh
m365 spo applicationcustomizer get --id 14125658-a9bc-4ddf-9c75-1b5767c9a337 --webUrl https://contoso.sharepoint.com/sites/sales --clientSideComponentProperties
```

## Remarks

This command can be used for retrieving an application customizer from a specific site. To retrieve an application customizer that's installed tenant-wide, view our dedicated [spo tenant applicationcustomizer get](../tenant/tenant-applicationcustomizer-get.mdx) command.

## Response

### Standard response

<Tabs>
<TabItem value="JSON">

```json
{
"ClientSideComponentId": "7096cded-b83d-4eab-96f0-df477ed7c0bc",
"ClientSideComponentProperties": "",
"ClientSideComponentId": "9a8b100c-246b-4592-9454-67826523e159",
"ClientSideComponentProperties": "{\"testMessage\":\"Test message\"}",
"CommandUIExtension": null,
"Description": null,
"Group": null,
"Id": "14125658-a9bc-4ddf-9c75-1b5767c9a337",
"HostProperties": "",
"Id": "4a428b32-08cf-45c7-9986-17585af38806",
"ImageUrl": null,
"Location": "ClientSideExtension.ApplicationCustomizer",
"Name": "Some customizer",
"Name": "{4a428b32-08cf-45c7-9986-17585af38806}",
"RegistrationId": null,
"RegistrationType": 0,
"Rights": "{\"High\":0,\"Low\":0}",
"Rights": "{\"High\":\"0\",\"Low\":\"0\"}",
"Scope": "Web",
"ScriptBlock": null,
"ScriptSrc": null,
"Sequence": 0,
"Title": "Some customizer",
"Sequence": 65536,
"Title": "HelloWorld",
"Url": null,
"VersionOfUserCustomAction": "16.0.1.0"
"VersionOfUserCustomAction": "1.0.1.0"
}
```

</TabItem>
<TabItem value="Text">

```text
ClientSideComponentId : 7096cded-b83d-4eab-96f0-df477ed7c0bc
ClientSideComponentProperties:
ClientSideComponentId : 9a8b100c-246b-4592-9454-67826523e159
ClientSideComponentProperties: {"testMessage":"Test message"}
CommandUIExtension : null
Description : null
Group : null
Id : 14125658-a9bc-4ddf-9c75-1b5767c9a337
HostProperties :
Id : 4a428b32-08cf-45c7-9986-17585af38806
ImageUrl : null
Location : ClientSideExtension.ApplicationCustomizer
Name : Some customizer
Name : {4a428b32-08cf-45c7-9986-17585af38806}
RegistrationId : null
RegistrationType : 0
Rights : {"High":0,"Low":0}
Rights : {"High":"0","Low":"0"}
Scope : Web
ScriptBlock : null
ScriptSrc : null
Sequence : 0
Title : Some customizer
Sequence : 65536
Title : HelloWorld
Url : null
VersionOfUserCustomAction : 16.0.1.0
VersionOfUserCustomAction : 1.0.1.0
```

</TabItem>
<TabItem value="CSV">

```csv
ClientSideComponentId,ClientSideComponentProperties,CommandUIExtension,Description,Group,Id,ImageUrl,Location,Name,RegistrationId,RegistrationType,Rights,Scope,ScriptBlock,ScriptSrc,Sequence,Title,Url,VersionOfUserCustomAction
7096cded-b83d-4eab-96f0-df477ed7c0bc,,,,,14125658-a9bc-4ddf-9c75-1b5767c9a337,,ClientSideExtension.ApplicationCustomizer,Some customizer,,0,"{""High"":0,""Low"":0}",Web,,,0,Some customizer,,16.0.1.0
ClientSideComponentId,ClientSideComponentProperties,CommandUIExtension,Description,Group,HostProperties,Id,ImageUrl,Location,Name,RegistrationId,RegistrationType,Rights,Scope,ScriptBlock,ScriptSrc,Sequence,Title,Url,VersionOfUserCustomAction
9a8b100c-246b-4592-9454-67826523e159,"{""testMessage"":""Test message""}",,,,,4a428b32-08cf-45c7-9986-17585af38806,,ClientSideExtension.ApplicationCustomizer,{4a428b32-08cf-45c7-9986-17585af38806},,0,"{""High"":""0"",""Low"":""0""}",Web,,,65536,HelloWorld,,1.0.1.0
```

</TabItem>
<TabItem value="Markdown">

```md
# spo applicationcustomizer get --title "Some customizer" --webUrl "https://contoso.sharepoint.com/sites/sales" --scope "Web"
# spo applicationcustomizer get --webUrl "https://contoso.sharepoint.com/sites/Marketing" --id "4a428b32-08cf-45c7-9986-17585af38806"

Date: 3/6/2023
Date: 16/05/2024

## Some customizer (14125658-a9bc-4ddf-9c75-1b5767c9a337)
## HelloWorld (4a428b32-08cf-45c7-9986-17585af38806)

Property | Value
---------|-------
ClientSideComponentId | 7096cded-b83d-4eab-96f0-df477ed7c0bc
ClientSideComponentProperties |
CommandUIExtension | null
Description | null
Group | null
Id | 14125658-a9bc-4ddf-9c75-1b5767c9a337
ImageUrl | null
ClientSideComponentId | 9a8b100c-246b-4592-9454-67826523e159
ClientSideComponentProperties | {"testMessage":"Test message"}
HostProperties |
Id | 4a428b32-08cf-45c7-9986-17585af38806
Location | ClientSideExtension.ApplicationCustomizer
Name | Some customizer
RegistrationId | null
Name | {4a428b32-08cf-45c7-9986-17585af38806}
RegistrationType | 0
Rights | {"High":"0","Low":"0"}
Scope | Web
ScriptBlock | null
ScriptSrc | null
Sequence | 0
Title | Some customizer
Url | null
VersionOfUserCustomAction | 16.0.1.0
Sequence | 65536
Title | HelloWorld
VersionOfUserCustomAction | 1.0.1.0
```

</TabItem>
</Tabs>

### `clientSideComponentProperties` response

<Tabs>
<TabItem value="JSON">

```json
{
"testMessage": "Test message"
}
```

</TabItem>
<TabItem value="Text">

```txt
testMessage: Test message
```

</TabItem>
<TabItem value="CSV">

```csv
testMessage
Test message
```

</TabItem>
<TabItem value="Markdown">

```md
# spo applicationcustomizer get --title "Some customizer" --webUrl "https://contoso.sharepoint.com/sites/sales" --scope "Web" --clientSideComponentProperties "true"

Date: 15/05/2024

Property | Value
---------|-------
testMessage | Test message
```

</TabItem>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,16 +44,16 @@ This command can be used for retrieving a list of application customizers from a
```json
[
{
"ClientSideComponentId": "4358e70e-ec3c-4713-beb6-39c88f7621d1",
"ClientSideComponentProperties": "{\"listTitle\":\"News\",\"listViewTitle\":\"Published News\"}",
"ClientSideComponentId": "9a8b100c-246b-4592-9454-67826523e159",
"ClientSideComponentProperties": "{\"testMessage\":\"Test message\"}",
"CommandUIExtension": null,
"Description": null,
"Group": null,
"HostProperties": "",
"Id": "f405303c-6048-4636-9660-1b7b2cadaef9",
"Id": "4a428b32-08cf-45c7-9986-17585af38806",
"ImageUrl": null,
"Location": "ClientSideExtension.ApplicationCustomizer",
"Name": "{f405303c-6048-4636-9660-1b7b2cadaef9}",
"Name": "{4a428b32-08cf-45c7-9986-17585af38806}",
"RegistrationId": null,
"RegistrationType": 0,
"Rights": {
Expand All @@ -64,7 +64,7 @@ This command can be used for retrieving a list of application customizers from a
"ScriptBlock": null,
"ScriptSrc": null,
"Sequence": 65536,
"Title": "NewsTicker",
"Title": "HelloWorld",
"Url": null,
"VersionOfUserCustomAction": "1.0.1.0"
}
Expand All @@ -75,47 +75,41 @@ This command can be used for retrieving a list of application customizers from a
<TabItem value="Text">

```text
Name Location Scope Id
-------------------------------------- ----------------------------------------- ----- ------------------------------------
{f405303c-6048-4636-9660-1b7b2cadaef9} ClientSideExtension.ApplicationCustomizer 3 f405303c-6048-4636-9660-1b7b2cadaef9
Id Location Name Scope
------------------------------------ ----------------------------------------- -------------------------------------- -----
4a428b32-08cf-45c7-9986-17585af38806 ClientSideExtension.ApplicationCustomizer {4a428b32-08cf-45c7-9986-17585af38806} 3
```

</TabItem>
<TabItem value="CSV">

```csv
Name,Location,Scope,Id
{f405303c-6048-4636-9660-1b7b2cadaef9},ClientSideExtension.ApplicationCustomizer,3,f405303c-6048-4636-9660-1b7b2cadaef9
ClientSideComponentId,ClientSideComponentProperties,CommandUIExtension,Description,Group,HostProperties,Id,ImageUrl,Location,Name,RegistrationId,RegistrationType,Scope,ScriptBlock,ScriptSrc,Sequence,Title,Url,VersionOfUserCustomAction
9a8b100c-246b-4592-9454-67826523e159,"{""testMessage"":""Test message""}",,,,,4a428b32-08cf-45c7-9986-17585af38806,,ClientSideExtension.ApplicationCustomizer,{4a428b32-08cf-45c7-9986-17585af38806},,0,3,,,65536,HelloWorld,,1.0.1.0
```

</TabItem>
<TabItem value="Markdown">

```md
# spo applicationcustomizer list --webUrl "https://contoso.sharepoint.com"
# spo applicationcustomizer list --webUrl "https://contoso.sharepoint.com/sites/Marketing"

Date: 28/2/2023
Date: 16/05/2024

## NewsTicker (f405303c-6048-4636-9660-1b7b2cadaef9)
## HelloWorld (4a428b32-08cf-45c7-9986-17585af38806)

Property | Value
---------|-------
ClientSideComponentId | 4358e70e-ec3c-4713-beb6-39c88f7621d1
CommandUIExtension | null
Description | null
Group | null
ClientSideComponentId | 9a8b100c-246b-4592-9454-67826523e159
ClientSideComponentProperties | {"testMessage":"Test message"}
HostProperties |
Id | f405303c-6048-4636-9660-1b7b2cadaef9
ImageUrl | null
Id | 4a428b32-08cf-45c7-9986-17585af38806
Location | ClientSideExtension.ApplicationCustomizer
RegistrationId | null
Name | {4a428b32-08cf-45c7-9986-17585af38806}
RegistrationType | 0
Scope | 3
ScriptBlock | null
ScriptSrc | null
Sequence | 65536
Title | NewsTicker
Url | null
Title | HelloWorld
VersionOfUserCustomAction | 1.0.1.0
```

Expand Down
Loading

0 comments on commit 34b170d

Please sign in to comment.