Get crossTenantAccessPolicy
Article
04/19/2023
1 contributor
Feedback
In this article
Namespace: microsoft.graph
Read the properties and relationships of a crossTenantAccessPolicy object.
Permissions
One of the following permissions is required to call this API. To learn more, including how to choose permissions, see Permissions .
Permission type
Permissions (from least to most privileged)
Delegated (work or school account)
Policy.Read.All, Policy.ReadWrite.CrossTenantAccess
Delegated (personal Microsoft account)
Not applicable
Application
Policy.Read.All, Policy.ReadWrite.CrossTenantAccess
HTTP request
GET /policies/crossTenantAccessPolicy
Name
Description
Authorization
Bearer {token}. Required.
Request body
Do not supply a request body for this method.
Response
If successful, this method returns a 200 OK
response code and a crossTenantAccessPolicy object in the response body.
Examples
Request
GET https://graph.microsoft.com/v1.0/policies/crossTenantAccessPolicy
// Code snippets are only available for the latest version. Current version is 5.x
var graphClient = new GraphServiceClient(requestAdapter);
var result = await graphClient.Policies.CrossTenantAccessPolicy.GetAsync();
For details about how to add the SDK to your project and create an authProvider instance, see the SDK documentation .
import (
"context"
msgraphsdk "github.com/microsoftgraph/msgraph-sdk-go"
//other-imports
)
graphClient := msgraphsdk.NewGraphServiceClientWithCredentials(cred, scopes)
result, err := graphClient.Policies().CrossTenantAccessPolicy().Get(context.Background(), nil)
For details about how to add the SDK to your project and create an authProvider instance, see the SDK documentation .
GraphServiceClient graphClient = GraphServiceClient.builder().authenticationProvider( authProvider ).buildClient();
CrossTenantAccessPolicy crossTenantAccessPolicy = graphClient.policies().crossTenantAccessPolicy()
.buildRequest()
.get();
For details about how to add the SDK to your project and create an authProvider instance, see the SDK documentation .
const options = {
authProvider,
};
const client = Client.init(options);
let crossTenantAccessPolicy = await client.api('/policies/crossTenantAccessPolicy')
.get();
For details about how to add the SDK to your project and create an authProvider instance, see the SDK documentation .
<?php
// THIS SNIPPET IS A PREVIEW FOR THE KIOTA BASED SDK. NON-PRODUCTION USE ONLY
$graphServiceClient = new GraphServiceClient($requestAdapter);
$result = $graphServiceClient->policies()->crossTenantAccessPolicy()->get();
For details about how to add the SDK to your project and create an authProvider instance, see the SDK documentation .
Response
HTTP/1.1 200 OK
Content-Type: application/json
{
"value": {
"@odata.type": "#microsoft.graph.crossTenantAccessPolicy",
"displayName": "CrossTenantAccessPolicy",
"allowedCloudEndpoints": ["microsoftonline.us", "partner.microsoftonline.cn"]
}
}