pnp / pnp/cli-microsoft365

Export themes from brand center

Open
#6,573 16 comments 4 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

feature request needs peer review
Dominant language
TypeScript
Stars
1.5k
Forks
413
Avg merge
5d 6h
Merged PRs (30d)
21

Description

Theme Center has an API to export the theme that has been directly created in the Brand Center.

https://<tenant>.sharepoint.com/sites/brandcenter/_api/brandcenter/GetTenantThemes

This call will return all a theme in the following format:

{
    "@odata.context": "https://contoso.sharepoint.com/sites/brandcenter/_api/$metadata#SP.TenantThemes",
    "hideDefaultThemes": false,
    "themeData": [
        {
            "id": 83,
            "isThemesV2": false,
            "isVisible": true,
            "name": "Coffee Theme",
            "source": 1,
            "themeJson": "{\"name\":\"Coffee Theme\",\"isInverted\":true,\"palette\":{\"themeDarker\":\"#171f1d\",\"themeDark\":\"#2c3b37\",\"themeDarkAlt\":\"#415751\",\"themePrimary\":\"#C0FFEE\",\"themeSecondary\":\"#56736b\",\"themeTertiary\":\"#6b8f85\",\"themeLight\":\"#80ab9f\",\"themeLighter\":\"#95c7ba\",\"themeLighterAlt\":\"#aae3d4\",\"black\":\"#171f1d\",\"neutralDark\":\"#2c3b37\",\"neutralPrimary\":\"#C0FFEE\",\"neutralPrimaryAlt\":\"#56736b\",\"neutralSecondary\":\"#6b8f85\",\"neutralTertiary\":\"#80ab9f\",\"neutralTertiaryAlt\":\"#000000\",\"neutralLight\":\"#000000\",\"neutralLighter\":\"#000000\",\"neutralLighterAlt\":\"#000000\",\"white\":\"#000000\",\"neutralQuaternaryAlt\":\"#000000\",\"neutralQuaternary\":\"#000000\",\"accent\":\"#4F6BED\"}}"
        }
    ]
}

This call returns all the themes.

m365 spo theme list

This does not return any of the Brand Center specifc themes so either we should include these calls in the regular command or write a dedicated set of Brand Center calls. Thoughts?

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the m365 spo theme list command and the documented Brand Center GetTenantThemes endpoint. Review the existing theme-listing flow and the 16-comment discussion to determine whether Brand Center themes belong in the regular command or a dedicated command. Done means the chosen approach returns the Brand Center-specific themes without regressing existing theme results.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript
Domain
api, cli
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Quiet
Clarity
Needs clarification
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.