cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
JoshAllan
New Member

SharePoint Rest API AddTenantTheme Returning False

I am using the REST API to create a SharePoint theme through Power Automate, the API call is returning a 200 (success) code but its output value is returning false and the theme is not being created.

 

Custom_Theme_Palette:

{

"palette": {

"themePrimary": "#ee3a43",

"themeLighterAlt": "#fef7f7",

"themeLighter": "#fcdddf",

"themeLight": "#fac1c4",

"themeTertiary": "#f4858a",

"themeSecondary": "#ef4f57",

"themeDarkAlt": "#d5333b",

"themeDark": "#b42b32",

"themeDarker": "#852025",

"neutralLighterAlt": "#faf9f8",

"neutralLighter": "#f3f2f1",

"neutralLight": "#edebe9",

"neutralQuaternaryAlt": "#e1dfdd",

"neutralQuaternary": "#d0d0d0",

"neutralTertiaryAlt": "#c8c6c4",

"neutralTertiary": "#c2c2c2",

"neutralSecondary": "#858585",

"neutralSecondaryAlt": "#858585",

"neutralPrimaryAlt": "#4b4b4b",

"neutralPrimary": "#333333",

"neutralDark": "#272727",

"black": "#1d1d1d",

"white": "#ffffff"

}

}

 

 

Outputs:

{

"name": "Company Red",

"themeJson": "@{outputs('Compose_-_Custome_Theme_Pallette')}"

}

 

1.png

 

I can't work out why the value is returning false or where I could be going wrong. Any suggestions?

 

The output is as follows:

 

2.png

1 ACCEPTED SOLUTION

Accepted Solutions
v-xiaochen-msft
Community Support
Community Support

Hi @JoshAllan ,

 

I did a sample for you.

vxiaochenmsft_0-1656042540515.png

vxiaochenmsft_1-1656042548286.png

replace(variables('var'),'"','\"')
 
vxiaochenmsft_2-1656042571686.png

 

Result:

vxiaochenmsft_3-1656042596143.png

 

vxiaochenmsft_4-1656042608644.png

 

Best Regards,

Wearsky

View solution in original post

1 REPLY 1
v-xiaochen-msft
Community Support
Community Support

Hi @JoshAllan ,

 

I did a sample for you.

vxiaochenmsft_0-1656042540515.png

vxiaochenmsft_1-1656042548286.png

replace(variables('var'),'"','\"')
 
vxiaochenmsft_2-1656042571686.png

 

Result:

vxiaochenmsft_3-1656042596143.png

 

vxiaochenmsft_4-1656042608644.png

 

Best Regards,

Wearsky

Helpful resources

Announcements
Power Platform Conf 2022 768x460.jpg

Join us for Microsoft Power Platform Conference

The first Microsoft-sponsored Power Platform Conference is coming in September. 100+ speakers, 150+ sessions, and what's new and next for Power Platform.

New Ideas Forum MPA.jpg

A new place to submit your Ideas for Power Automate

Announcing a new way to share your feedback with the Power Automate Team.

MPA Virtual Workshop Carousel 768x460.png

Register for a Free Workshop

Learn to digitize and optimize business processes and connect all your applications to share data in real time.

MPA Licensing.jpg

Ask your licensing questions at the Power Automate AMA!

Join Priya Kodukula and the licensing team, super users and MVPs to find answers to your questions on Power Automate licensing.

Users online (2,799)