Inaccurate Security Graph API Responses - microsoft-graph-security

For some odd reason the results that I am getting from the Graph Security API the past two days are inaccurate and I can't for the life of me figure out why.
If I query https://graph.microsoft.com/v1.0/security/alerts I am returned 7 old alerts without any obvious relationship, rhyme, or reason for populating my results. These are not the 7 most recent, and we have had more than 7 alerts.
For example, when attempting to append $filter=vendorInformation/provider eq 'Microsoft Defender ATP' I receive:
{
"#odata.context": "https://graph.microsoft.com/v1.0/$metadata#Security/alerts",
"value": []
}
This issue appears to extend for me across all of the MTP services.
I can see the alerts within MDATP, and others like MCAS and ASC for example when navigating directly to those portals or querying their platform specific api's, like
https://api-us.securitycenter.windows.com/api/alerts for example.
I am getting data returned, it is just not the right data.
I am utilizing a Postman App registration with the SecurityEvents.Read.All and SecurityEvents.ReadWrite.All "Granted for MYDOMAIN".
I feel like I am missing something here. Any one else having issues? More than happy to share additional details that would be useful.

Thank you for your feedback. Our MDATP team has identified and fixed the issue and it should now work as expected.

Related

ASP.NET Core Web API - Measuring response data

We have an ASP.NET Core Web API project. Today on accident I found an API method that was returning unnecessary amounts of data.
In my example we were returning users along with countries which is what we needed, but we were also returning a list of cities for each country so that was a tremendous amount if data, I was able to reduce it from 7MB to 23KB (per Insomnia client).
I was able to fix this by performing a select and creating a new country object and not passing in the cities property. I am not even sure if that's the right way to fix that problem but I will leave that for another time. My question is...
Is there a tool/nuget package out there that would provide this type of info? I'd like to get an idea on how much data we are sending to the clients when different methods are called. We have app insights but I don't believe it provides that data or at least I don't see it.
Thank you!
I was able to resolve this issue by writing some middleware code that logs the results to azure application insights, here is a copy of the code if anyone needs it:
https://gist.github.com/tekguy/52b245f6582158d7240f80bf46c4cc71
You can then query this info by using app insights log query:
requests
| order by timestamp desc
| project url, customMeasurements.Size

Pocket API: How to get tags list

I found that the Retrieving API has a tag parameter which is used to get items tagged with tag_name.
But I do not know how to get the tags list. If the tags list cannot be got, then how to set this parameter to get special items with this tag.
I have been examining this issue very thoroughly for the past weeks (a request for tag list functionality from a user of my Window 8.1 app Pockazine), and my research confirms that fcedillo is right in saying that the API does not seem to support such a simple request.
However, both the Android app, the iPad app and the webapp (and the mentioned getTags.php) does provide a list of tags which leads me to believe there is a non-official API to get this information. How else would the native Pocket apps be able to get this information - I do not believe it is downloading a full list of all articles.
Even if this functionality is not implemented in the API yet, it really should be a simple database query like "select distinct(tag_name) from ... where user_id = ..." with a webservice layer to wrap it with a few parameters.
I have raised the issue with Pocket and followed up with emails to Pocket for the past few weeks without any luck.
My own workaround is to get all active and archived items with the "detailType" parameter set to "complete" and then iterate over the entire list and collect tags from the tag list in each article.
That is a cumbersome and expensive operations both in terms of time (20 seconds for 6.000 articles downloaded in packages of 2,500), data packages (at least 12 MB for that list of 6.000 articles) and database cpu-time (probably not that much, but still worth mentioning).
Even this is not a satisfactory solution since it seems I can maximum download 6,000 articles (unless I myself have precisely that amount of active and archived articles) - and even if I could it would be a bad idea to e.g. download 100,000 articles just to show maybe 50 tags or so.
So ... If anybody has a different solution (or I get an answer from Pocket) then I would be extremely glad for a followup to this post.
I think that Tag list cannot be got using the API
If you just want the list, you can take it from getpocket.com, browse to your list
And look for response to getTags.php request
https://www.evernote.com/shard/s187/sh/7d0fb324-379c-466f-a695-fc2184576ad6/5b23f3bb0165d9c7
You will find an array of tags:
eg. ["tag1","tag2","tag3"]
Maybe this could be helpful https://github.com/HartasCuerdas/ruPocket
That is an implementation to work with Tags from Pocket, its written in Ruby
I contacted api#getpocket.com and they gave the same answer - no API to just get the tags list.
I forgot to set a detail type, which is why I wasn't getting the tag information on an individual article.
Call https://getpocket.com/v3/get with the 'detailType' POST parameter set to 'complete' (as someone already mentioned earlier in a longer answer)
Then you get the tags back
....
"has_video": "0",
"has_image": "1",
"word_count": "513",
"tags": {
"entrepreneur": {
"item_id": "1768258176",
"tag": "entrepreneur"
},
"work": {
"item_id": "1768258176",
"tag": "work"
}
},
....

TestCases field on TestSet object is empty

I wrote a Rally app to do reporting on TestSets and TestCases. Suddenly today, my app was not getting any TestCases in it's query.
To simplify this, I will take my app out of the equation and I am just running queries with the web service api: https://rally1.rallydev.com/slm/doc/webservice/index.jsp?version=1.40
If I query a TestSet, the TestCases field, which should contain a list of the TestCases in the TestSet, is coming back empty for TestSets that definitely have TestCases. This was working perfectly up until sometime in the last few days (we used the app today and weren't getting any TestCases when the last time we used it, we were and no changes have occurred on our end).
If I look at Test Cases in Track->Iteration Status in Rally and expand the TestSet to see all the TestCases, they show up. So they are there, just for some reason the web service api isn't returning them.
I've spent the last two hours reading the API documentation and searching Google to see if anyone else has had this issue or if anything might have changed that is causing this, but I haven't found anything.
I have confirmed that other objects containing a list of TestCase objects (such as TestFolders) are properly returning a list of TestCases. I have also confirmed that I am able to query the individual TestCases that should be returned in the list. I have also confirmed that I am able to query the TestCaseResult for the particular TestSet and TestCase.
So I am really stumped. It appears as though it's just TestSet.TestCases that isn't working and I am unable to find any specific cause or correlate something unrelated that could be the cause.
Any thoughts?
Rally's DevOps team issued a fix for this issue the evening of 10-jan-2013. TestSet queries through WSAPI should be appropriately hydrated with member TestCases again. Contact Rally Support with any questions or concerns.
This is a bug - Rally's engineering team is aware of the problem and is working on a fix. Please file a Case with Rally Support to report/get status updates on the Defect resolution.

freebase api - restore content by GUID

I'm trying to get topic details by guid, since it is the only parameter I've got from the client. Is it possible to get all details regarding topic by it's guid? I was trying with "trans raw" but very small amount of information were returned from freebase. Also, I was trying with mql:
https://api.freebase.com/api/service/mqlread?query={"query":[{ "guid":"#9202a8c04000641f800000001b6c8698" }]}
But didn't had any success with that either. Any help here please?
Ignoring the question of why you are asking to be paid for a job that you didn't know how to do, you should try something along the lines of this:
http://www.freebase.com/queryeditor?q=%5B%7B%22guid%22%3A%22%239202a8c04000641f800000001b6c8698%22%2C%22type%22%3A%5B%5D%2C%22name%22%3Anull%7D%5D
There's a large amount of documentation available on http://wiki.freebase.com on how to use the various APIs.
Also note that you are using a deprecated API which is going away, although that isn't an issue if this is a one-time task.

/me/home doesn't return all the posts

I've noticed that me/home in the Graph API doesn't return posts by certain users. I've tried this in my app as well as just using Graph Explorer. It returns most posts, consistently fails to include posts by certain friends. I don't think this is a caching issue, because I've tried over a period of one day with same results. It's not random either. It's the same handful of posts that are always missing.
I checked the posts in question and don't see anything special. And it's happening with newer posts also.
Do I need to add any special parameters to my request ?
Users, in their Facebook privacy preferences, can configure what data 3rd party applications can see about themselves.
What you are seeing is that certain users have made their activities not viewable to your application.