Filter Google Cloud Security Command Center Findings by Folder - security

I am trying to filter Google Cloud Security Command Center finding notifications by filter using this link. https://cloud.google.com/security-command-center/docs/how-to-api-filter-notifications
state or parent works fine to filter for. source_properties is one of the fields. Within source_properties ResourcePath is one of the fields, but when I submit to create a field I get back ERROR: (gcloud.scc.notifications.create) INVALID_ARGUMENT: Invalid Filter. If specified, filter should be on a field in the request.
Have tried "state = "ACTIVE" AND source_properties.resourcepath.folders = "456353778849""" filters like this. Anyone had any luck with this and what syntax do you use?

Use this format state="ACTIVE" AND source_properties.resourcepath:"456353778849"
The colon : is a "contain" notation.

Related

KQL (Keyword not Kusto) Nesting, Document Selecting for an Extranet

Longtime member, been a while since posting. Working on building out an Extranet and am running into a stupidly frustrating issue. First time using SharePoint Online as document repository for external (anonymous) users. In doing so, using Azure permissoning, have the documents split up in repositories on SharePoint based on access level. On top of that I am attempting to display them in Highlighted Content Web part, I am not able to sort them out by location AND type. I have a custom column in each repository that defines what type they are, but when I try to add the AND portion to the KQL it doesn't work. Additionally the internet seems to be massively void of actual documentation of KQL.
(
path:https://domain.sharepoint.com/sites/example/Level%201%20Resources/
OR
path:https://domain.sharepoint.com/sites/example/Level%202%20Resources/
OR
path:https://domain.sharepoint.com/sites/example/Level%203%20Resources/
OR
path:https://domain.sharepoint.com/sites/example/Level%204%20Resources/
OR
path:https://domain.sharepoint.com/sites/example/Level%205%20Resources/
OR
path:https://domain.sharepoint.com/sites/example/Level%206%20Resources/
AND
DocType:"Articles"
)
The above will simply pull all documents from those locations and ignore the AND statement. I have tried renaming it to call on the custom column identifier pulled from the source, and that doesn't work either.
The only real documentation I can find on this is: Here
Which doesn't appear to address filtering based on custom column tags.
EDIT: Reformatted to pull all docs from multiple locations using below, but the nesting portion still isn't working
path:(
"https://domain.sharepoint.com/sites/example/Level%201%20Resources/"
OR
"https://domain.sharepoint.com/sites/example/Level%202%20Resources/"
OR
"https://domain.sharepoint.com/sites/example/Level%203%20Resources/"
OR
"https://domain.sharepoint.com/sites/example/Level%204%20Resources/"
OR
"https://domain.sharepoint.com/sites/example/Level%205%20Resources/"
OR
"https://domain.sharepoint.com/sites/example/Level%206%20Resources/"
)
So the additional issue I was running into was the creation of a column to separate out based on the category of file type (not literal file type). Apparently SPO doesn't like it when you create a list and then reference that list to then filter by via KQL. So I found this morning this.
Apparently the best way to do this is create a custom "Choice" column, allow some time for it to flow and update, and then you can reference it via KQL.

Error when trying to find records from SharePoint in PowerApps

I am mostly new to PowerApps but I am creating a stand-alone app that uses Power Automate to upload records to a SharePoint library. I have that working, and on one of the forms I have search functionality so that the gallery is filtered by the value in a few text boxes.
What I want to do is on the form where they upload new records, I want to look up to see if metadata already exists and eventually populate text boxes with the information from those records. Right now I am using a button with this code in the OnSelect event to just find how many records exist with that project number:
Set(varCount, CountRows(Filter(ProjectDocuments,'txtProj#'.Text, ProjNum )))
I also tried this.
If(CountRows(Filter(ProjectDocuments,'txtProj#'.Text, ProjNum )) > 0, Set(varCount, 1), Set(varCount,2))
I am getting a warning about large datasets only. However, when I try to run it nothing happens. When I look at the monitor details I get this error first:
"The query is not valid.\r\nclientRequestId: 816f2bfb-ab50-4285-b9c9-a7e03548d15f\r\nserviceRequestId: 816f2bfb-ab50-4285-b9c9-a7e03548d15f"
Then this one:
"Error when trying to retrieve data from the network"
The connection works when I am filtering a gallery, but not when I'm trying to use the count. Does anyone have any idea what is happening?
Thanks!
I'm not sure, but I suspect that there's an error in your Filter. The second argument should result in a logical true/false (include the record or not). Yours looks to resolve to a string.
Filter(ProjectDocuments,'txtProj#'.Text, ProjNum )
I think you mean
Filter(ProjectDocuments,'txtProj#'.Text = ProjNum )

Docusign API: Searching for a given Envelope/Envelopes using Custom Field

How do we compose a get url to get an envelope or envelopes that contain a given custom field. I tried to compose a get url as one shown below but not getting the desired results (i tried to follow the documentation here -> https://developers.docusign.com/esign-rest-api/reference/Envelopes/Envelopes/listStatusChanges but I think i am not passing the custom field to the query string correctly
https://demo.docusign.net/restapi/v2.1/accounts/ACCOUNT_ID_NUMBER/envelopes?from_date=2019-12-05&folder_types=sentitems&status=completed&custom_field=[SignerEmail=john.doe#email.com]
You're using the right API call. Try it without the square brackets and encode the value.
Eg
... &custom_field=SignerEmail%3Djohn.doe%40email.com
The above is untested. If it doesn't work, we'll dig into it further
Important: are you trying to find envelopes that have a custm_envelop_field (metadata) that you created and you named "SignerEmail"?? If so, the the above is the way to go.
If you're looking for envelopes where a signing recipient's email is john#doe.com, try the general search as Inbar suggests. If it doesn't work, you may need another tactic.
Suggest you read here:
https://developers.docusign.com/esign-rest-api/guides/concepts/envelopes/search
the parameter is called search_text and would search everything including custom fields. There's no need to separately specify custom fields.
Something like this:
https://demo.docusign.net/restapi/v2.1/accounts/ACCOUNT_ID_NUMBER/envelopes?search_text=[SignerEmail=john.doe#email.com]

Azure Logic App API Pagination using Until condition

Wondering if you could help with this problem please. I am ingesting data from an API using Azure logic App. I have managed to set up everything else but struggling with pagination in Until condition.Logic App continues to ingest/consume data and creates blank json files with data[]. I have added the screenshots (with and without data in the page). When data is completed, empty or blank page looks like data[].
Any idea what could be my condition in "Until" ?
enter image description here
In your question I can't see the "Until" condition but just a "If" condition, but I think you just want to know how to check if the "data" field is empty and then do different actions (If I misunderstand your requirements, please provide more details and I will try to help you on it).
Please refer to the steps below:
1. We need to use a "Parse JSON" action to parse your json data, when click "Use sample payload to generate schema", you can put the json data which "data" field is not empty into it. And then it will generate the schema automatically.
2. Then we can use "length()" method in the "If" condition.
The whole expression of "length()" method above is:
Below provide the code for you to copy.
length(body('Parse_JSON')?['data'])
Hope it helps~

How can I crawl but not index web pages in OpenSearchServer?

I'm using OpenSearchServer to provide search functionality on a web site. I want to crawl all pages on the site for links to follow but I want to exclude some pages from the index. I can't work out how to do this.
Specifically the website includes a shop that has its own product search and I am keeping this search for products and categories. The product pages have URLs like http://www.thesite/p/123 so I don't want to include any page like this in the search results. However some product pages reference background info pages and I want these to be included in the search index.
The problem I have is that the filter has no effect on the results - it doesn't filter out the /p/ and /c/ results. If I change the filter by unticking the negative box I get no results so it seems to be either the contents of the field or the filter criteria that is causing the problem.
I've tried adding a negative filter to the default query called search in the Query > Filter tab on the index with url:"http://www.thesite/p/*"
but it seems that wildcards are not supported for query filters although they are supported for Crawler > Exclusion list filters.
I've tried adding a new field called urlField in Schema > Fields and populating it using an analyzer configured using the Whitespace Tokenizer and a regular expression (http://www.thesite/(c|p)/). When I use the Test button it seems to generate two tokens for my test URL http://www.thesite/p/123:
http://www.thesite/p/
p
I'd hoped to be able to use the first one in a Query > Filter to exclude all the shop results and optionally be able to use the p (for product) or c (for category) if I need to search the product pages sometime in the future.
The urlShop field in the schema is set up as follows:
Indexed: yes
Stored: no (because I don't need the field back, just want to be able to filter on it)
TermVector: No
Analyzer: urlShop
Copy of: url
I've added urlFilter:"http://www.thesite/p/" to Query > Filters with the negative box ticked.
This seems to have no effect on the results when I use the default renderer.
To see whether it affects the returned results I unticked the negative box in the query filter I get no results in the default renderer. This leads me to believe that the urlShop field is not being populated but I'm not sure how to check this directly.
I would like to know whether there is an easier way to do this but if my approach makes sense in the context of OpenSearchServer please can you help me identify what's wrong?
The website is running under IIS and OpenSearchServer will be configured on the same server running in Tomcat.
Finally figured this out...
Go to query and hit edit for your configured query. Then go to the filters tab. Add a query filter like this:
urlExact:"http://myurltoexclude*"
Check the "negative" box. Click add.
Now make sure to click "save in the tiny little button on the right hand side. This is the part I missed. The URLS are still in the DB and crawl, but at least they aren't returned in results.

Resources