Closed thondal-evry closed 4 years ago
InvalidTemplate. Unable to process template language expressions in action 'Set_SiteExists_variable' inputs at line '1' and column '3986': 'The template language function 'bool' was invoked with a parameter that is not valid. The value cannot be converted to the target type.'.
Please can you have a look at the output history of the CheckSiteExists runbook in Azure automation and let me know whether there are any errors in the output.
Thanks
This: ? If so: { "headers": { "Transfer-Encoding": "chunked", "Retry-After": "15", "Vary": "Accept-Encoding", "X-SharePointHealthScore": "0", "X-MS-SPConnector": "1", "X-SP-SERVERSTATE": "ReadOnly=0", "DATASERVICEVERSION": "3.0", "SPClientServiceRequestDuration": "215", "SPRequestGuid": "63951d70-a7bc-4033-b718-7ede0f18f11d", "request-id": "63951d70-a7bc-4033-b718-7ede0f18f11d", "MS-CV": "cB2VY7ynM0C3GH7eDxjxHQ.0", "Strict-Transport-Security": "max-age=31536000", "X-FRAME-OPTIONS": "SAMEORIGIN", "MicrosoftSharePointTeamServices": "16.0.0.20113", "X-Content-Type-Options": "nosniff", "X-MS-InvokeApp": "1; RequireReadOnly", "Timing-Allow-Origin": "*", "x-ms-apihub-cached-response": "false", "Cache-Control": "max-age=0, private", "Date": "Wed, 27 May 2020 09:12:52 GMT", "Location": "https://logic-apis-northeurope.azure-apim.net/apim/sharepointonline/c57cbf380e384168b3384d9aa9b5a657/datasets/https%253A%252F%252Fcontoso.sharepoint.com%252Fsites%252Fteamsrequestapp4/tables/Teams%2520Requests/onupdateditems?triggerstate=ZGF0ZXRpbWU9MjAyMC0wNS0yN1QwOToxMjo0N1o%3d", "P3P": "CP=\"ALL IND DSP COR ADM CONo CUR CUSo IVAo IVDo PSA PSD TAI TELo OUR SAMo CNT COM INT NAV ONL PHY PRE PUR UNI\"", "X-AspNet-Version": "4.0.30319", "X-Powered-By": "ASP.NET", "Content-Type": "application/json; charset=utf-8", "Expires": "Tue, 12 May 2020 09:12:52 GMT", "Last-Modified": "Wed, 27 May 2020 09:12:52 GMT", "Content-Length": "3578" }, "body": { "@odata.etag": "\"6\"", "ItemInternalId": "3", "ID": 3, "Title": "Test team", "TeamDescription": "beskrivelse", "BusinessJustification": "begrunnelse", "Owners": [ { "@odata.type": "#Microsoft.Azure.Connectors.SharePoint.SPListExpandedUser", "Claims": "i:0#.f|membership|geir@contoso.onmicrosoft.com", "DisplayName": "Geir Bakke", "Email": "geir@contoso.onmicrosoft.com", "Picture": "https://contoso.sharepoint.com/sites/teamsrequestapp4/_layouts/15/UserPhoto.aspx?Size=L&AccountName=geir@contoso.onmicrosoft.com", "Department": null, "JobTitle": null }, { "@odata.type": "#Microsoft.Azure.Connectors.SharePoint.SPListExpandedUser", "Claims": "i:0#.f|membership|user@contoso.onmicrosoft.com", "DisplayName": "Simen Skogheim", "Email": "user@contoso.onmicrosoft.com", "Picture": "https://contoso.sharepoint.com/sites/teamsrequestapp4/_layouts/15/UserPhoto.aspx?Size=L&AccountName=user@contoso.onmicrosoft.com", "Department": null, "JobTitle": null } ], "Owners@odata.type": "#Collection(Microsoft.Azure.Connectors.SharePoint.SPListExpandedUser)", "Owners#Claims": [ "i:0#.f|membership|geir@contoso.onmicrosoft.com", "i:0#.f|membership|user@contoso.onmicrosoft.com" ], "Owners#Claims@odata.type": "#Collection(String)", "Members": [], "Members@odata.type": "#Collection(Microsoft.Azure.Connectors.SharePoint.SPListExpandedUser)", "Members#Claims": [], "Members#Claims@odata.type": "#Collection(String)", "Visibility": { "@odata.type": "#Microsoft.Azure.Connectors.SharePoint.SPListExpandedReference", "Id": 0, "Value": "Private" }, "Visibility#Id": 0, "Status": { "@odata.type": "#Microsoft.Azure.Connectors.SharePoint.SPListExpandedReference", "Id": 3, "Value": "Approved" }, "Status#Id": 3, "TeamAlias": "Testteam", "ConfidentialData": true, "TemplateId": "standard", "Comments": "heil greitt", "Stage": { "@odata.type": "#Microsoft.Azure.Connectors.SharePoint.SPListExpandedReference", "Id": 4, "Value": "Submitted" }, "Stage#Id": 4, "TemplateTitle": "Standard", "SharePointSiteURL": "https://contoso.sharepoint.com/sites/Testteam", "FirstPartyTemplate": true, "Created": "2020-05-27T09:05:27Z", "RowKey": "e70cf6e2-1f09-4f86-9397-437c66a3c2d7", "Modified": "2020-05-27T09:07:09Z", "Author": { "@odata.type": "#Microsoft.Azure.Connectors.SharePoint.SPListExpandedUser", "Claims": "i:0#.f|membership|user@contoso.onmicrosoft.com", "DisplayName": "Simen Skogheim", "Email": "user@contoso.onmicrosoft.com", "Picture": "https://contoso.sharepoint.com/sites/teamsrequestapp4/_layouts/15/UserPhoto.aspx?Size=L&AccountName=user@contoso.onmicrosoft.com", "Department": null, "JobTitle": null }, "Author#Claims": "i:0#.f|membership|user@contoso.onmicrosoft.com", "Editor": { "@odata.type": "#Microsoft.Azure.Connectors.SharePoint.SPListExpandedUser", "Claims": "i:0#.f|membership|user@contoso.onmicrosoft.com", "DisplayName": "Simen Skogheim", "Email": "user@contoso.onmicrosoft.com", "Picture": "https://contoso.sharepoint.com/sites/teamsrequestapp4/_layouts/15/UserPhoto.aspx?Size=L&AccountName=user@contoso.onmicrosoft.com", "Department": null, "JobTitle": null }, "Editor#Claims": "i:0#.f|membership|user@contoso.onmicrosoft.com", "{Identifier}": "Lists%252fTeamsRequests%252f3_.000", "{IsFolder}": false, "{Thumbnail}": { "Large": null, "Medium": null, "Small": null }, "{Link}": "https://contoso.sharepoint.com/sites/teamsrequestapp4/_layouts/15/listform.aspx?PageType=4&ListId=1e7af479-34ef-4f3e-9bf9-53a17352542f&ID=3&ContentTypeID=0x0100A8D0EC3F97EF1B43BA5E361AFBDFD169", "{Name}": "Test team", "{FilenameWithExtension}": "Test team", "{Path}": "Lists/TeamsRequests/", "{FullPath}": "Lists/TeamsRequests/3_.000", "{HasAttachments}": false, "{VersionNumber}": "1.0" } }
I have the same problem. The response from the "Get site exists job" cannot be processed this way.
Same issue here. Error: InvalidTemplate. Unable to process template language expressions in action 'Set_SiteExists_variable' inputs at line '1' and column '3796': 'The template language function 'bool' was invoked with a parameter that is not valid. The value cannot be converted to the target type.'.
CheckSiteExists runbook status is completed.
@MichelvanVliet please click into one of those completed jobs and lick on 'All Logs'. This will give you the entire output, I expect there will be an error in there.
Correct! An error occured: Cannot bind argument to parameter 'AppId' because it is null.
@MichelvanVliet ok - so can you have a look in the Logic App (ProcessTeamRequest) and copty the values in the AppId and AppSecret variables.
In the automation account under 'Variables' there should be AppId and AppSecret variables. If you edit these and update the values to those you copied and save.
Then re-try and let me know what happens.
I imagine there's been an error in the deployment script.
@alexc-MSFT can you tell me how/where I would be able to find the AppId and AppSecret variables within the Logic App?
@alexc-MSFT found them under the run details as ClientID and ClientSecret. I recreated the variables within the Automation account using these values and I had a successful run after that. Thanks for your help!
@alexc-MSFT @MichelvanVliet Works for me also. Thx.
I'll test this tomorrow and see if this resolves my issue as well. Will reply back.
@MichelvanVliet @backiii glad to hear you have it resolved.
@thondal-evry I will leave this issue open for you.
I took what i Found here:
And put it here:
but same error... i'm probably doing something wrong ðŸ˜
Hi. I'm a bit stuck on this still with the same error. Any suggestions? Should I just try from the beginning again and see if that resolves any issue or is there something else I might try?
thanks for all the tips so far
The place where it fails is the "check if site exists" variable that seems to fail. which does not seem to be accepted as a valid value:
I took what i Found here:
And put it here:
but same error... i'm probably doing something wrong ðŸ˜
@thondal-evry, Today I had the same error as you. Followed your steps and they did work out for me.
When I was editing the appSecret variable for the runbook I almost updated the description instead of the actual secret because the secret field is hidden at first. Did you update the secret or did you update the description?
@thondal-evry as @burnwalled said above, please double check you are updating the value in the variable.
You can also check the output of the CheckSiteExists job, I am anticipating a token error in here meaning the appId or appSecret is not correct in the variables.
Also having this issue as well.
I checked the App ID and Client secret and they should be fine. (Should I create a new client secret)? Whats odd is 2 weeks ago when this was deployed it was working fine. I have not made any edits to the flows or anything in the Resource Group. I have also opened a separate issue with the Flow aspect (never failing or succeeding. It will run continuously.)
Also having this issue as well.
I checked the App ID and Client secret and they should be fine. (Should I create a new client secret)? Whats odd is 2 weeks ago when this was deployed it was working fine. I have not made any edits to the flows or anything in the Resource Group. I have also opened a separate issue with the Flow aspect (never failing or succeeding. It will run continuously.)
As @alexc-MSFT wrote, check the output of the CheckSiteExists output. For me it was running successfully but maybe it fails for you.
@burnwalled The output shows as successful for me.
@chetferg check the 'All Logs' tab of the job output and let me know what you see in there. Thanks
FYI all - I am updating the code in the deployment script to handle when the automation account already exists.
What we have found is that when the script is executed a second time, it creates a new secret, updates the automation variables but not the AD app itself. Therefore the secret is not correct causing the above to fail.
I will link the pull request here.
Thanks
Closing this issue for now @chetferg @burnwalled please re-open/raise a new issue if you are still experiencing issues.
Thanks
InvalidTemplate. Unable to process template language expressions in action 'Set_SiteExists_variable' inputs at line '1' and column '3986': 'The template language function 'bool' was invoked with a parameter that is not valid. The value cannot be converted to the target type.'.