Contacts-OnPremisesSyncBehavior.ReadWrite.All
Allows the app to update the on-premises sync behavior of all contacts in all mailboxes without a signed-in user.
Permission Details
Read and update the on-premises sync behavior of contacts
Allows the app to update the on-premises sync behavior of all contacts in all mailboxes without a signed-in user.
c8948c23-e66b-42db-83fd-770b71ab78d2
Read and update the on-premises sync behavior of contacts
Allows the app to read and update the on-premises sync behavior of contacts a user has permissions to, including their own and shared contacts.
1e4c6c41-0803-4f52-85ef-0a5d63ad8670
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[] { "Contacts-OnPremisesSyncBehavior.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/contacts-onpremisessyncbehavior")
.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(["Contacts-OnPremisesSyncBehavior.ReadWrite.All"]);
const client = Client.init({
authProvider: (done) => done(null, token.token)
});
const response = await client.api("/contacts-onpremisessyncbehavior").get();
Connect-MgGraph -Scopes "Contacts-OnPremisesSyncBehavior.ReadWrite.All"
Invoke-MgGraphRequest -Method GET -Uri "https://graph.microsoft.com/v1.0/contacts-onpremisessyncbehavior"
from azure.identity import InteractiveBrowserCredential
import requests
credential = InteractiveBrowserCredential(
client_id="YOUR_CLIENT_ID",
tenant_id="YOUR_TENANT_ID"
)
token = credential.get_token("Contacts-OnPremisesSyncBehavior.ReadWrite.All")
response = requests.get(
"https://graph.microsoft.com/v1.0/contacts-onpremisessyncbehavior",
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 Contacts-OnPremisesSyncBehavior.ReadWrite.All
Grant Admin Consent
Application permissions always require admin consent.