AuditActivity.Write
Allows the application to upload bulk activity audit logs to the audit store.
In short
AuditActivity.Write is available as both an application permission and a delegated permission in the Microsoft Graph API, grouped under the AuditActivity category. Allows the application to upload bulk activity audit logs to the audit store. It grants write access to resources. Application permissions always require admin consent.
Permission Details
Upload activity audit logs to the audit store.
Allows the application to upload bulk activity audit logs to the audit store.
f6318678-2713-4bb6-b123-233e7336c1bd
Upload activity audit logs to the audit store.
Allows the application to upload bulk activity audit logs to the audit store.
a78fd341-0672-4792-a8ae-a5925b2546eb
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 documentationGraph Methods
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.
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.
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 docsMicrosoft 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 docsCode Examples
using Azure.Identity;
using Microsoft.Graph;
var scopes = new[] { "AuditActivity.Write" };
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/auditactivity")
.GetAsync();
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(["AuditActivity.Write"]);
const client = Client.init({
authProvider: (done) => done(null, token.token)
});
const response = await client.api("/auditactivity").get();
Connect-MgGraph -Scopes "AuditActivity.Write"
Invoke-MgGraphRequest -Method GET -Uri "https://graph.microsoft.com/v1.0/auditactivity"
from azure.identity import InteractiveBrowserCredential
import requests
credential = InteractiveBrowserCredential(
client_id="YOUR_CLIENT_ID",
tenant_id="YOUR_TENANT_ID"
)
token = credential.get_token("AuditActivity.Write")
response = requests.get(
"https://graph.microsoft.com/v1.0/auditactivity",
headers={"Authorization": f"Bearer {token.token}"}
)
print(response.json())
App Registration
Navigate to Azure Portal
Go to App registrations in Microsoft Entra admin center
Add API Permission
Select your app → API permissions → Add a permission → Microsoft Graph
Select Permission Type
Choose Application permissions or delegated permissions and search for AuditActivity.Write
Grant Admin Consent
Application permissions always require admin consent.
Frequently asked questions
What is the AuditActivity.Write Microsoft Graph permission?
AuditActivity.Write is available as both an application permission and a delegated permission in the Microsoft Graph API, grouped under the AuditActivity category. Allows the application to upload bulk activity audit logs to the audit store. It grants write access to resources. Application permissions always require admin consent. It is mapped to the Microsoft Graph auditactivity resource type.
Is AuditActivity.Write an application or a delegated permission?
AuditActivity.Write 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 AuditActivity.Write require admin consent?
Application permissions always require admin consent.
What is the permission ID (GUID) for AuditActivity.Write?
For AuditActivity.Write, the application (app role) ID is f6318678-2713-4bb6-b123-233e7336c1bd, and the delegated (OAuth2 scope) ID is a78fd341-0672-4792-a8ae-a5925b2546eb. These are the real Microsoft Graph identifiers and can be used directly in an app registration manifest.