ESC
Type to search...

ThreatHunting.ReadWrite.All

Export JSON
Export CSV
Copy URL
Print
ApplicationDelegated Read/Write All Resources

Allows the app to run hunting queries and to read and write hunting functions, without a signed-in user.

In short

ThreatHunting.ReadWrite.All is available as both an application permission and a delegated permission in the Microsoft Graph API, grouped under the ThreatHunting category. Allows the app to run hunting queries and to read and write hunting functions, without a signed-in user. It grants read and write access to resources. Application permissions always require admin consent.

Permission data: October 3, 2026 at 3:19 AM UTC
Delegated Access App-Only Access

Permission Details

Application Permission

Run hunting queries and manage all hunting functions

Allows the app to run hunting queries and to read and write hunting functions, without a signed-in user.

Delegated Permission Admin consent required

Run hunting queries and manage hunting functions

Allows the app to run hunting queries and to read and write hunting functions, on behalf of the signed-in user.

Properties

Properties metadata is not available for this permission mapping. View on Microsoft Learn

JSON Representation

JSON representation is not available for this permission mapping. View on Microsoft Learn

Relationships

Relationships metadata is not available for this permission mapping.

View resource documentation

Graph Methods

Delegated access App-only access
No Learn or OpenAPI mapping available

Microsoft Graph v1.0 endpoints are not available from refreshed Microsoft Learn or Microsoft Graph OpenAPI metadata for this permission.

No API methods available for this version.

No Learn or OpenAPI mapping available

Microsoft Graph beta endpoints are not available from refreshed Microsoft Learn or Microsoft Graph OpenAPI metadata for this permission.

No API methods available for this version.

No Microsoft Learn PowerShell mapping available

Microsoft Graph PowerShell v1.0 commands are not available from refreshed Microsoft Learn PowerShell snippets for this permission.

No deterministic PowerShell command map is available for this permission.

Browse PowerShell docs
No Microsoft Learn PowerShell mapping available

Microsoft Graph PowerShell beta commands are not available from refreshed Microsoft Learn PowerShell snippets for this permission.

No deterministic PowerShell command map is available for this permission.

Browse PowerShell docs

Code Examples

C# / .NET SDK
using Azure.Identity;
using Microsoft.Graph;

var scopes = new[] { "ThreatHunting.ReadWrite.All" };
var credential = new InteractiveBrowserCredential(
    new InteractiveBrowserCredentialOptions
    {
        ClientId = "YOUR_CLIENT_ID",
        TenantId = "YOUR_TENANT_ID",
        RedirectUri = new Uri("http://localhost")
    });

var graphClient = new GraphServiceClient(credential, scopes);
var response = await graphClient
    .WithUrl("https://graph.microsoft.com/v1.0/threathunting")
    .GetAsync();
JavaScript
import { Client } from "@microsoft/microsoft-graph-client";
import { InteractiveBrowserCredential } from "@azure/identity";

const credential = new InteractiveBrowserCredential({
  clientId: "YOUR_CLIENT_ID",
  tenantId: "YOUR_TENANT_ID",
  redirectUri: "http://localhost"
});

const token = await credential.getToken(["ThreatHunting.ReadWrite.All"]);
const client = Client.init({
  authProvider: (done) => done(null, token.token)
});

const response = await client.api("/threathunting").get();
PowerShell
Connect-MgGraph -Scopes "ThreatHunting.ReadWrite.All"
Invoke-MgGraphRequest -Method GET -Uri "https://graph.microsoft.com/v1.0/threathunting"
Python
from azure.identity import InteractiveBrowserCredential
import requests

credential = InteractiveBrowserCredential(
    client_id="YOUR_CLIENT_ID",
    tenant_id="YOUR_TENANT_ID"
)

token = credential.get_token("ThreatHunting.ReadWrite.All")
response = requests.get(
    "https://graph.microsoft.com/v1.0/threathunting",
    headers={"Authorization": f"Bearer {token.token}"}
)

print(response.json())

App Registration

1

Navigate to Azure Portal

Go to App registrations in Microsoft Entra admin center

2

Add API Permission

Select your app → API permissions → Add a permission → Microsoft Graph

3

Select Permission Type

Choose Application permissions or delegated permissions and search for ThreatHunting.ReadWrite.All

4

Grant Admin Consent

Application permissions always require admin consent.

Frequently asked questions

What is the ThreatHunting.ReadWrite.All Microsoft Graph permission?

ThreatHunting.ReadWrite.All is available as both an application permission and a delegated permission in the Microsoft Graph API, grouped under the ThreatHunting category. Allows the app to run hunting queries and to read and write hunting functions, without a signed-in user. It grants read and write access to resources. Application permissions always require admin consent. It is mapped to the Microsoft Graph threathunting resource type.

Is ThreatHunting.ReadWrite.All an application or a delegated permission?

ThreatHunting.ReadWrite.All is available as both an application permission (app-only access, no signed-in user) and a delegated permission (access on behalf of a signed-in user).

Does ThreatHunting.ReadWrite.All require admin consent?

Application permissions always require admin consent.

What is the permission ID (GUID) for ThreatHunting.ReadWrite.All?

For ThreatHunting.ReadWrite.All, the application (app role) ID is 6e251752-0d87-4158-b87b-b60e768fa657, and the delegated (OAuth2 scope) ID is a2e55068-32fd-4091-a37c-120338337abd. These are the real Microsoft Graph identifiers and can be used directly in an app registration manifest.