Contracts.Read.All
Allows the app to read available properties on contracts, without a signed-in user.
Permission Details
Read contracts
Allows the app to read available properties on contracts, without a signed-in user.
f9af4646-98b0-4e9d-a53e-40d4f6452fc4
Read contracts
Allows the app to read available properties of contracts, on behalf of the signed-in user.
9df4d5b0-7921-4437-9ea8-adf0c9e276dc
Properties
Properties is shown from stable Microsoft Graph v1.0 metadata.
| Property | Type | Description |
|---|---|---|
contractType |
StringNullable |
Type of contract. The possible values are: SyndicationPartner, BreadthPartner, ResellerPartner. See more in the table below. |
customerId |
GuidNullable |
The unique identifier for the customer tenant referenced by this partnership. Corresponds to the id property of the customer tenant's organization resource. |
defaultDomainName |
StringNullable |
A copy of the customer tenant's default domain name. The copy is made when the partnership with the customer is established. It isn't automatically updated if the customer tenant's default domain name changes. |
displayName |
StringNullable |
A copy of the customer tenant's display name. The copy is made when the partnership with the customer is established. It is not automatically updated if the customer tenant's display name changes. |
id |
String |
The unique identifier for the partnership. Key, read-only |
deletedDateTime |
date-timeNullable |
Date and time when this object was deleted. Always null when the object hasn't been deleted. |
JSON Representation
JSON representation is shown from stable Microsoft Graph v1.0 metadata.
{
"contractType": "String",
"customerId": "Guid",
"defaultDomainName": "String",
"displayName": "String",
"id": "String (identifier)"
}
Relationships
Relationships is shown from stable Microsoft Graph v1.0 metadata.
| Relationship | Type | Description |
|---|---|---|
customerId |
uuid |
The unique identifier for the customer tenant referenced by this partnership. Corresponds to the id property of the customer tenant's organization resource. |
Graph Methods
Microsoft Graph v1.0 endpoints are shown from Microsoft Graph OpenAPI resource-family metadata because Microsoft Learn does not publish a direct mapping for this permission.
Microsoft Graph beta endpoints are shown from Microsoft Graph OpenAPI resource-family metadata because Microsoft Learn does not publish a direct mapping for this permission.
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[] { "Contracts.Read.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/contracts")
.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(["Contracts.Read.All"]);
const client = Client.init({
authProvider: (done) => done(null, token.token)
});
const response = await client.api("/contracts").get();
Connect-MgGraph -Scopes "Contracts.Read.All"
Invoke-MgGraphRequest -Method GET -Uri "https://graph.microsoft.com/v1.0/contracts"
from azure.identity import InteractiveBrowserCredential
import requests
credential = InteractiveBrowserCredential(
client_id="YOUR_CLIENT_ID",
tenant_id="YOUR_TENANT_ID"
)
token = credential.get_token("Contracts.Read.All")
response = requests.get(
"https://graph.microsoft.com/v1.0/contracts",
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 Contracts.Read.All
Grant Admin Consent
Application permissions always require admin consent.