我有一个,它从一个SharePoint文件夹中获取一个JSON文件(当放到它中时),我希望能够读取它的内容并提取一个键/值。我遇到的问题是,它在第二步崩溃,获取文件内容,并出现错误
遇到内部服务器错误。跟踪Id是'3bc1890c-1932-4a2e-af14-6e5cca1534be‘。
我意识到这与JSON文件的语法有关。当我使用以下JSON文件运行流时
{
"products": {
"GF": [
{
"product_name": "GF",
"remediation": {
"type": "package",
"packages": [
{
"service": "av",
"service_name": "AV",
"description": "Detects Prestige ransomware payloads",
"kill_chain": {
"step": "Delivery"
},
"link": "https://www.GF.com/updates/antivirus?version=90.06850",
"minimum_version": "90.06850"
}
]
},
"detection": {
"virus": [
"W32/Filecoder.OMM!tr.ransom"
],
"virusid": [
10108353
]
}
}
]
},
"title": "Prestige Ransomware",
"sub_title": "Impacting organizations in Ukraine and Poland",
"link": "https://www.microsoft.com/security/blog/2022/10/14/new-prestige-ransomware-impacts-organizations-in-ukraine-and-poland/",
"cve_list": [
"TBA"
],
"description": "Researchers at Microsoft Threat Intelligence Center (MSTIC) have identified evidence of a novel ransomware campaign targeting organizations in the transportation and logistics industries in Ukraine and Poland. According to the report, the new ransomware labels itself with a ransom note of “Prestige ranusomeware”.",
"tag": "Prestige Ransomware",
"event_handler_desc": "",
"m": 851548,
"additional_resources": [
{
"Source": "Microsoft Security Blog",
"Link": "https://www.microsoft.com/security/blog/2022/10/14/new-prestige-ransomware-impacts-organizations-in-ukraine-and-poland/"
}
],
"ob_url": "https://www.GF.com/ob-alert/prestige-ransomware"
}PA工作流成功执行。但是,当我尝试使用下面的JSON文件使用相同的PA工作流时(所需的)
[
{
"products": {
"GF": [
{
"product_name": "GF",
"remediation": {
"type": "package",
"packages": [
{
"service": "av",
"service_name": "AV",
"description": "Detects Prestige ransomware payloads",
"kill_chain": {
"step": "Delivery"
},
"link": "https://www.GF.com/updates/antivirus?version=90.06850",
"minimum_version": "90.06850"
}
]
},
"detection": {
"virus": [
"W32/Filecoder.OMM!tr.ransom"
],
"virusid": [
10108353
]
}
}
]
},
"title": "Prestige Ransomware",
"sub_title": "Impacting organizations in Ukraine and Poland",
"link": "https://www.microsoft.com/security/blog/2022/10/14/new-prestige-ransomware-impacts-organizations-in-ukraine-and-poland/",
"cve_list": [
"TBA"
],
"description": "Researchers at Microsoft Threat Intelligence Center (MSTIC) have identified evidence of a novel ransomware campaign targeting organizations in the transportation and logistics industries in Ukraine and Poland. According to the report, the new ransomware labels itself with a ransom note of “Prestige ranusomeware”.",
"tag": "Prestige Ransomware",
"event_handler_desc": "",
"m": 851548,
"additional_resources": [
{
"Source": "Microsoft Security Blog",
"Link": "https://www.microsoft.com/security/blog/2022/10/14/new-prestige-ransomware-impacts-organizations-in-ukraine-and-poland/"
}
],
"ob_url": "https://www.GF.com/ob-alert/prestige-ransomware"
}
]工作流与我在帖子开头发布的错误一起崩溃。似乎初始和结束使得获取文件内容的工作流步骤崩溃。
问题是,这是我需要使用的实际JSON语法。任何想法或建议都不会很有价值,因为我在过去的几天里一直在为它工作,而且我被困在了大的时间里!
PA工作流如下

提前谢谢你,尼科斯
发布于 2022-11-13 10:56:14
如果无法推断文件的内容(因为该文件没有扩展名),该操作将返回一个base64字符串。

当您将文件重命名为.txt扩展名时,它会将内容推断为文本,因此可以工作。
与其重命名文件,如果您想使其完美,将需要痛苦的因素取决于您采取的方法,您可以简单地解码base64字符串在$content字段中使用这样的表达式.
decodeBase64(body('Get_file_content')?['$content'])..。在Parse操作的Content字段中,但在Expression部分,而不是Dynamic content部分。

这应该能给你你想要的。
结果

https://stackoverflow.com/questions/74409891
复制相似问题