Forum Discussion
Lee-Martin
Jan 16, 2023Brass Contributor
Add-PnPTenantTheme - Attempted to perform an unauthorized operation.
I've tried to upload a theme, but I'm geting an Attempted to perform an unauthorized operation I'm an admin on the particular site I'm trying to upload to, so I assumed this would be enough permi...
Lee-Martin
Brass Contributor
I'm using Connect-PnPOnline -Url https://<homesite>.sharepoint.com/<site> -Interactive
The response when I try and add a theme using your method above gives me
Cannot contact site at the specified URL https://<homesite>.sharepoint.com/<site>. There is
no Web named "/gskgepo/_vti_bin/sites.asmx".
What is this "/_vti_bin/sites.asmx" stuff that gets added to the end?
The response when I try and add a theme using your method above gives me
Cannot contact site at the specified URL https://<homesite>.sharepoint.com/<site>. There is
no Web named "/gskgepo/_vti_bin/sites.asmx".
What is this "/_vti_bin/sites.asmx" stuff that gets added to the end?
Lee-Martin
Jan 17, 2023Brass Contributor
Figured it out, I needed to add sites before /<site>
https://<homesite>.sharepoint.com/sites/<site>
https://<homesite>.sharepoint.com/sites/<site>
- SvenSieverdingJan 17, 2023Bronze ContributorWell... you can directly set the theme colors on one site using the "Invoke-SiteTemplate" approach, but it seems like you can not add new themes to the gallery just for the one site.
Otherwise..... You could ask your client to execute that Add-PnPTenantTheme command.... But remember; Then the Theme will be available on every site in the tenant.
Best Regards,
Sven - Lee-MartinJan 17, 2023Brass ContributorSo there is no way to just do it for just one site? My client doesn't want me to have admin access across the whole Site collection
- SvenSieverdingJan 17, 2023Bronze Contributor
Hello Lee-Martin ,
if you apply the theme via the "Invoke-PnPSiteTemplate" command, it is applied immediately as the current selection below site theme for the current site and does not show up below the "Sharepoint Theme themes". But you don't need to be a SharePoint Admin to do so.
If you want your theme to be displayed below "SharePoint themes", you need to connect to your SharePoint admin site ("https://<tenant>-admin.sharepoint.com") as a SharePoint administrator and invoke the Add-PnPTenantTheme command. But you need to be a SharePoint admin for that and that theme will be available on all sites.$themepalette = @{ "themePrimary" = "#00ffff"; "themeLighterAlt" = "#f3fcfc"; "themeLighter" = "#daffff"; "themeLight" = "#affefe"; "themeTertiary" = "#76ffff"; "themeSecondary" = "#39ffff"; "themeDarkAlt" = "#00c4c4"; "themeDark" = "#009090"; "themeDarker" = "#005252"; "neutralLighterAlt" = "#f8f8f8"; "neutralLighter" = "#f4f4f4"; "neutralLight" = "#eaeaea"; "neutralQuaternaryAlt" = "#dadada"; "neutralQuaternary" = "#d0d0d0"; "neutralTertiaryAlt" = "#c8c8c8"; "neutralTertiary" = "#a6a6a6"; "neutralSecondaryAlt" = "#767676"; "neutralSecondary" = "#666666"; "neutralPrimary" = "#333"; "neutralPrimaryAlt" = "#3c3c3c"; "neutralDark" = "#212121"; "black" = "#000000"; "white" = "#fff"; "primaryBackground" = "#fff"; "primaryText" = "#333" } Add-PnPTenantTheme -Identity "MyCompanyTheme" -Palette $themepalette -IsInverted $false
Best Regards,
Sven - Lee-MartinJan 17, 2023Brass ContributorI can't find any indication as to where there is a template either?
How can I find this? According to PnP it has uploaded properly. - Lee-MartinJan 17, 2023Brass Contributor
SvenSieverding
However, the theme is not appearing in SharePoint (it doesn't appear in change the look)