Graph Security API
27 TopicsIPC Security Alerts userStates data now returning null instead of information
Hello, I've noticed that all new security alerts generated from the IPC provider since 27 September no longer contain full userStates data. Specifically the accountName, domainName and userPrincipalName are all set to null. The only user identifier that is maintained is the aadUserId. Is anyone else seeing this issue? I pull alerts with a GET /v1.0/security/alerts?$filter=vendorinformation/provider eq 'IPC' Example snippet of the issue: New alerts: userStates": [ { "aadUserId": "protecting-the-inno-cent-users", "accountName": null, "domainName": null, "emailRole": "unknown", "isVpn": null, "logonDateTime": "2022-09-27T20:06:19.5816216Z", "logonId": null, "logonIp": "127.83.247.216", "logonLocation": "Location, PT", "logonType": null, "onPremisesSecurityIdentifier": null, "riskScore": null, "userAccountType": null, "userPrincipalName": null } ], versus an old alert userStates": [ { "aadUserId": "protecting-the-inno-cent-users", "accountName": "john.doe", "domainName": "example.net", "emailRole": "unknown", "isVpn": null, "logonDateTime": "2022-09-27T18:17:53.5121378Z", "logonId": null, "logonIp": "127.2.185.40", "logonLocation": "Location, CA", "logonType": null, "onPremisesSecurityIdentifier": null, "riskScore": null, "userAccountType": null, "userPrincipalName": "email address removed for privacy reasons" } ], I have a ticket open, but I do not have high hopes of explanation or resolution,3.7KViews1like3CommentsCreate alert when a login was attempted from certain IP address (or block of addresses)
I'm trying to create an alert when there is a login attempt to certain IP, using the following MG Graph PS command: $newAlert = Invoke-RestMethod -Uri $alertUrl -Method Post -Headers $authHeader -Body $alertBody The response I got is: Invoke-RestMethod: {"error":{"code":"","message":"POST is not supported".... $alertUrl = "https://graph.microsoft.com/v1.0/security/alerts" $AlertBody = { "networkConnections": [{ "destinationAddress": "30.1XX.XX.XX" }], "title": "Login Attempt from Specific IP", "category": "SuspiciousActivity", "description": "Login attempt detected from IP address: 30.1XX.XX.XX", "vendorInformation": { "subProvider": "Sub Prov EFI", "provider": "Prov EFI"}, "assignedTo": "me", "cloudAppStates": [{ "servicePlanId": "00000000-0000-0000-0000-000000000000", "appId": "00000002-0000-0ff1-ce00-000000000000"}] } Assume Headers are OK (they are, verified) Question: What caused the error?. Is that the endpoint URI is not the correct one? or is that this kind of alerts cannot be set using Graph?2.7KViews0likes3CommentsDefender API question... EmailEvents Table, IdentityInfo table?
Defender API Question.... Is there a way to query the EmailEvents table through an api? Or the Identityinfo table? I'm currently testing through - api-us.securitycenter.microsoft.com and playing around with the available tables to query, there doesn't seem to be much other than the Device* tables. Also, I've got the Microsoft api reference links from here, https://docs.microsoft.com/en-us/microsoft-365/security/defender-endpoint/exposed-apis-list?view=o365-worldwide. And I'm going through the Azure Sentinel Notebooks and the msticpy notebooks, but I'd appreciate any videos or blogs about exploring the tables and data through the api and jupyter notebooks. This is really super cool!2.5KViews0likes1CommentHow to use multiple filter operations in beta Graph API?
I am trying to run the following API: https://graph.microsoft.com/beta/users?$count=true&$filter=signInActivity/lastSignInDateTime le 2022-09-01T00:00:00Z and endsWith(mail,'@alumni.xxx.xxx') and I get the following response: { "error": { "code": "BadRequest", "message": "Filter not supported.", "innerError": { "date": "2022-12-22T19:21:39", "request-id": "d994b51c-xxxx-xxxx-b0d5-97a8923ab5t9", "client-request-id": "d302b51c-xxxx-yyyy-zzzz-12a8035ce9r9" } } } Any idea as to what I'm doing wrong? Thx2.4KViews0likes4Commentsmicrosoftgraph / security-api-solutions for MISP giving access_token error
Hi all, I am trying to integrate MISP feeds to Sentinel and followed the steps as per the documentation - https://techcommunity.microsoft.com/t5/microsoft-sentinel-blog/integrating-open-source-threat-feeds-with-misp-and-sentinel/ba-p/1350371 https://github.com/microsoftgraph/security-api-solutions/tree/master/Samples/MISP I am stuck at the last step where we have to run the script.py in order to push the feeds to sentinel. I am getting the error of access_token Traceback (most recent call last): File "script.py", line 100, in <module> main() File "script.py", line 93, in main with RequestManager(total_indicators) as request_manager: File "/home/srvadmin/mispToSentinel/security-api-solutions/Samples/MISP/RequestManager.py", line 42, in __enter__ access_token = self._get_access_token( File "/home/srvadmin/mispToSentinel/security-api-solutions/Samples/MISP/RequestManager.py", line 70, in _get_access_token access_token = requests.post( KeyError: 'access_token' I am unable to identify where the script is failing and how to rectify it.1.6KViews0likes1CommentGraph permission question
Hi I am new to Graph PowerShell, But let me explain the problem and correct for me if I miss understand anything. The Microsoft Graph PowerShell application has the following permission in the with the admin consent. - User.ReadWrite.All Delegated(This permission are granted for Admin1) User1 need to connect and fetch some data using Graph PowerShell and need to use only User.Read.all delegated scope. But when User1 login. he also have User.ReadWrite.All It seems that any delegate authentcation are granted all permission assigned to the application. How can I seperate the permission and only assign User.Read.All to User1 and User.ReadWrite.All to Admin1 Thanks1.6KViews0likes3CommentsAuditing / Configuring Defender Alerts/Rules/Emails/Notifications
Hey there! I am trying to find a way to audit (and hopefully configure!) the Defender notification emails to make sure they are configured to send to our helpdesk, so it can start our ticketing process. Short of creating a custom application, and trying to subscribe or poll manually across every tenant, the best I have found so far is manually opening these for every separate customer to try and setup the settings So starting from https://security.microsoft.com for each customer, going to Settings, and following the mentioned path, or navigating to the URL on the right in turn with each customer tenantID filled in Incident Notifs M365 Defender > Email Notifs > Incidents https://security.microsoft.com/securitysettings/defender/email_notifications?emailNotificationRuleTy...<EachCustomerTenantID> Actions M365 Defender > Email Notifs > Actions https://security.microsoft.com/securitysettings/defender/email_notifications?emailNotificationRuleTy...<EachCustomerTenantID> Threat Analytics M365 Defender > Email Notifs > Threat Analytics https://security.microsoft.com/securitysettings/defender/email_notifications?emailNotificationRuleTy...<EachCustomerTenantID> Alert Tuning/Suppression M365 Defender > Alert Tuning https://security.microsoft.com/securitysettings/defender/alert_suppression?tid=<EachCustomerTenantID> Endpoint Alerts Endpoints > Email Notifications > Alerts https://security.microsoft.com/securitysettings/endpoints/email_notifications?childviewid=alerts&tid...<EachCustomerTenantID> Endpoint Vulnerabilities Endpoints > Email Notifications > Vulnerabilities https://security.microsoft.com/securitysettings/endpoints/email_notifications?childviewid=vulnerabil...<EachCustomerTenantID> Identity Health Notifs Microsoft Defender for Identity > Health Issues https://security.microsoft.com/settings/identities?tabid=healthIssuesNotifications&tid=<EachCustomerTenantID> Identity Alerts Microsoft Defender for Identity > Alert https://security.microsoft.com/settings/identities?tabid=securityAlertsNotifications&tid=<EachCustomerTenantID> I can easily get Incidents or Alerts for a specific tenant, even across tenants through DAP/GDAP/CSP rights. However - rather than querying hundreds of tenants, or trying to set up WebHook subscriptions or similar for them - I was going to just start with Auditing (and possibly manually configuring) the Notification Emails and Alerts to send an email to our ticketing system that we could follow up on. However, I can't find any PowerShell commands or API where I can access these notification settings (access the actual ALERTS themselves, no problem, but not audit the actual Notification Configuration on more than an individual Alert/Incident level) The backend of security.microsoft.com uses private API endpoints like https://security.microsoft.com/apiproxy/mtp/k8s/settings/ThreatAnalyticNotificationsSettings or https://security.microsoft.com/apiproxy/mtp/k8s/cloud/public/internal/IncidentNotificationSettingsV2 as an example for Incident Notifications. The list above is the URLs that you access as the Administrator to configure these by hand, but I am hoping to find a way to get API/Programmatic/Scripted access to these values - but I cannot find any (public) API that seems to access them other than manually. Does anyone have an idea?1.4KViews0likes0CommentsGet list of all tiIndicators using Graph API
Hello Community, I have a Sentinel system with about 30K of TI indicators, that were ingested from Alien Vault using this playbook: Azure-Sentinel/Playbooks/Get-AlienVault_OTX at master ยท Azure/Azure-Sentinel (github.com). Now I would like to get a list of all indicators using Graph API. I tried to do it using Graph Explorer with the following query: GET https://graph.microsoft.com/beta/security/tiIndicators And I got the following response: After that, I tried to add a new indicator using Graph API: POST https://graph.microsoft.com/beta/security/tiIndicators and a request body from this example: Create threat intelligence indicator - Microsoft Graph beta | Microsoft Docs Then I did the first step of getting the list of existing indicators and I did see the indicator that was added manually. I went to Sentinel TI to check whether I see this manually added indicator or not there and I did see it. So my question is the following: Has anyone tried GraphAPI for TI indicators? What am I missing? Why don't I see all my indicators? It is in beta now, but It seems weird that the GET request shows nothing.1.4KViews0likes1CommentGraph API for Microsoft Secure Score Recommended actions
Hello, We were able to get Secure Score and Secure Score Control Profiles using Graph API. We would also want to get the recommended actions in Microsoft Secure Score using Graph API or Microsoft Defender API. Is there a way that we can do this? Thanks1.3KViews0likes0Comments