Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Deploy a Microsoft Copilot Studio copilot as a SharePoint component with single sign-on (SSO) enabled #204

Open
DBarwick opened this issue May 10, 2024 · 1 comment

Comments

@DBarwick
Copy link

I have followed the guidance on GitHub for deployment - https://github.com/microsoft/CopilotStudioSamples/blob/master/SharePointSSOComponent/SETUP.md

This issue I have is that the app will not install on the site

Error message

AppInstallError

The content database on the server is temporarily unavailable.
Details: Deployment failed in host web https://__________.sharepoint.com/sites/DB-Techhub-Test for app pva-extension-sso-client-side-solution/14634225-91e5-41a4-b9cc-161ccb3400b4. System.Exception: HandleProvisioningException rethrowing: The specified value for property ClientSideComponentProperties is not a valid JSON string, exception: Newtonsoft.Json.JsonReaderException: Unexpected character encountered while parsing value: T. Path 'greet', line 1, position 369. at Newtonsoft.Json.JsonTextReader.ParseValue() at Newtonsoft.Json.JsonTextReader.Read() at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.CreateJObject(JsonReader reader) at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.CreateObject(JsonReader reader, Type objectType, JsonContract contract, JsonProperty member, JsonContainerContract containerContract, JsonProperty containerMember, Object existingValue) at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.Deserialize(JsonReader reader, Type objectType, Boolean checkAdditionalContent) at Newtonsoft.Json.JsonSerializer.DeserializeInternal(JsonReader reader, Type objectType) at Newtonsoft.Json.JsonConvert.DeserializeObject(String value, Type type, JsonSerializerSettings settings) at Microsoft.SharePoint.SPUserCustomAction.ValidateClientSideAction(). ---> Microsoft.SharePoint.SPException: The specified value for property ClientSideComponentProperties is not a valid JSON string, exception: Newtonsoft.Json.JsonReaderException: Unexpected character encountered while parsing value: T. Path 'greet', line 1, position 369. at Newtonsoft.Json.JsonTextReader.ParseValue() at Newtonsoft.Json.JsonTextReader.Read() at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.CreateJObject(JsonReader reader) at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.CreateObject(JsonReader reader, Type objectType, JsonContract contract, JsonProperty member, JsonContainerContract containerContract, JsonProperty containerMember, Object existingValue) at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.Deserialize(JsonReader reader, Type objectType, Boolean checkAdditionalContent) at Newtonsoft.Json.JsonSerializer.DeserializeInternal(JsonReader reader, Type objectType) at Newtonsoft.Json.JsonConvert.DeserializeObject(String value, Type type, JsonSerializerSettings settings) at Microsoft.SharePoint.SPUserCustomAction.ValidateClientSideAction(). at Microsoft.SharePoint.Utilities.SPUtility.ThrowSPExceptionWithTraceTag(UInt32 tagId, ULSCat traceCategory, String resourceId, Object[] resourceArgs) at Microsoft.SharePoint.SPUserCustomAction.ValidateClientSideAction() at Microsoft.SharePoint.SPUserCustomAction.Update() at Microsoft.SharePoint.SPWebUserCustomAction.Update() at Microsoft.SharePoint.SPCustomActionElement.AddCustomActionToDatabase(SPSite site, SPWeb webNull) at Microsoft.SharePoint.SPCustomActionElement.UpdateCustomActionsTable(SPFeature feature, SPSite site, SPWeb web, CultureInfo cultureInfo, Boolean fForce) --- End of inner exception stack trace --- at Microsoft.SharePoint.SPFeature.HandleProvisioningException(Exception e, Boolean force) at Microsoft.SharePoint.SPCustomActionElement.UpdateCustomActionsTable(SPFeature feature, SPSite site, SPWeb web, CultureInfo cultureInfo, Boolean fForce) at Microsoft.SharePoint.SPFeature.UpdateCachedFeatureDefinitionInformation(SPSite site, SPWeb web, Boolean fForce) at Microsoft.SharePoint.SPFeature.Activate(SPSite siteParent, SPWeb webParent, SPFeaturePropertyCollection props, SPFeatureActivateFlags activateFlags, Boolean fForce) at Microsoft.SharePoint.SPFeatureCollection.AddInternal(SPFeatureDefinition featdef, Version version, SPFeaturePropertyCollection properties, SPFeatureActivateFlags activateFlags, Boolean force, Boolean fMarkOnly) at Microsoft.SharePoint.Packaging.SPTargetWebDeploymentGroup.InstallOrUpgrade(SPSite site, Nullable`1& solutionId, Boolean& swapNeeded)

I have also tested with no changes made to the elements.xml file but same error

Any help appreciated

@adilei
Copy link
Collaborator

adilei commented May 12, 2024

Based on the error, it actually seems you are using a modified version of element.xml

Maybe it would be easier to use the pre-built package and modify the app's properties post deployment?

https://github.com/microsoft/CopilotStudioSamples/blob/master/SharePointSSOComponent/SETUP.md#step-3---download-and-configure-the-sharepoint-spfx-component

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants