APIs under the /beta version in Microsoft Graph are subject to change. Use of these APIs in production applications is not supported. To determine whether an API is available in v1.0, use the Version selector.
Choose the permission or permissions marked as least privileged for this API. Use a higher privileged permission or permissions only if your app requires it. For details about delegated and application permissions, see Permission types. To learn more about these permissions, see the permissions reference.
Permission type
Least privileged permissions
Higher privileged permissions
Delegated (work or school account)
CrossTenantUserProfileSharing.Read.All
CrossTenantUserProfileSharing.ReadWrite.All
Delegated (personal Microsoft account)
Not supported.
Not supported.
Application
CrossTenantUserProfileSharing.Read.All
CrossTenantUserProfileSharing.ReadWrite.All
In delegated scenarios with work or school accounts, the signed-in user must be assigned a supported Microsoft Entra role or a custom role with a supported role permission. Global Reader is the least privileged role supported for this operation.
HTTP request
POST /directory/inboundSharedUserProfiles/{userId}/exportPersonalData
In the request body, supply JSON representation of the parameters.
The following table shows the parameters that can be used with this action.
Parameter
Type
Description
storageLocation
String
The storage location to download the exported data to. This can be an Azure Storage Account.
Response
If successful, this method returns a 202 Accepted response code and a Location header in the response body pointing to the storage location of the exported data.
POST https://graph.microsoft.com/beta/directory/inboundSharedUserProfiles/c228b2ae-c4fb-4eda-9620-7e73dddd1cac/exportPersonalData
{
"storageLocation": "MyStorageAccount"
}
// Code snippets are only available for the latest version. Current version is 5.x
// Dependencies
using Microsoft.Graph.Beta.DirectoryNamespace.InboundSharedUserProfiles.Item.ExportPersonalData;
var requestBody = new ExportPersonalDataPostRequestBody
{
StorageLocation = "MyStorageAccount",
};
// To initialize your graphClient, see https://learn.microsoft.com/en-us/graph/sdks/create-client?from=snippets&tabs=csharp
await graphClient.Directory.InboundSharedUserProfiles["{inboundSharedUserProfile-userId}"].ExportPersonalData.PostAsync(requestBody);
Important
Microsoft Graph SDKs use the v1.0 version of the API by default, and do not support all the types, properties, and APIs available in the beta version. For details about accessing the beta API with the SDK, see Use the Microsoft Graph SDKs with the beta API.
mgc-beta directory inbound-shared-user-profiles export-personal-data post --inbound-shared-user-profile-user-id {inboundSharedUserProfile-userId}
Important
Microsoft Graph SDKs use the v1.0 version of the API by default, and do not support all the types, properties, and APIs available in the beta version. For details about accessing the beta API with the SDK, see Use the Microsoft Graph SDKs with the beta API.
// Code snippets are only available for the latest major version. Current major version is $v0.*
// Dependencies
import (
"context"
msgraphsdk "github.com/microsoftgraph/msgraph-beta-sdk-go"
graphdirectory "github.com/microsoftgraph/msgraph-beta-sdk-go/directory"
//other-imports
)
requestBody := graphdirectory.NewExportPersonalDataPostRequestBody()
storageLocation := "MyStorageAccount"
requestBody.SetStorageLocation(&storageLocation)
// To initialize your graphClient, see https://learn.microsoft.com/en-us/graph/sdks/create-client?from=snippets&tabs=go
graphClient.Directory().InboundSharedUserProfiles().ByInboundSharedUserProfileUserId("inboundSharedUserProfile-userId").ExportPersonalData().Post(context.Background(), requestBody, nil)
Important
Microsoft Graph SDKs use the v1.0 version of the API by default, and do not support all the types, properties, and APIs available in the beta version. For details about accessing the beta API with the SDK, see Use the Microsoft Graph SDKs with the beta API.
// Code snippets are only available for the latest version. Current version is 6.x
GraphServiceClient graphClient = new GraphServiceClient(requestAdapter);
com.microsoft.graph.beta.directory.inboundshareduserprofiles.item.exportpersonaldata.ExportPersonalDataPostRequestBody exportPersonalDataPostRequestBody = new com.microsoft.graph.beta.directory.inboundshareduserprofiles.item.exportpersonaldata.ExportPersonalDataPostRequestBody();
exportPersonalDataPostRequestBody.setStorageLocation("MyStorageAccount");
graphClient.directory().inboundSharedUserProfiles().byInboundSharedUserProfileUserId("{inboundSharedUserProfile-userId}").exportPersonalData().post(exportPersonalDataPostRequestBody);
Important
Microsoft Graph SDKs use the v1.0 version of the API by default, and do not support all the types, properties, and APIs available in the beta version. For details about accessing the beta API with the SDK, see Use the Microsoft Graph SDKs with the beta API.
Microsoft Graph SDKs use the v1.0 version of the API by default, and do not support all the types, properties, and APIs available in the beta version. For details about accessing the beta API with the SDK, see Use the Microsoft Graph SDKs with the beta API.
<?php
use Microsoft\Graph\Beta\GraphServiceClient;
use Microsoft\Graph\Beta\Generated\Directory\InboundSharedUserProfiles\Item\ExportPersonalData\ExportPersonalDataPostRequestBody;
$graphServiceClient = new GraphServiceClient($tokenRequestContext, $scopes);
$requestBody = new ExportPersonalDataPostRequestBody();
$requestBody->setStorageLocation('MyStorageAccount');
$graphServiceClient->directory()->inboundSharedUserProfiles()->byInboundSharedUserProfileUserId('inboundSharedUserProfile-userId')->exportPersonalData()->post($requestBody)->wait();
Important
Microsoft Graph SDKs use the v1.0 version of the API by default, and do not support all the types, properties, and APIs available in the beta version. For details about accessing the beta API with the SDK, see Use the Microsoft Graph SDKs with the beta API.
Microsoft Graph SDKs use the v1.0 version of the API by default, and do not support all the types, properties, and APIs available in the beta version. For details about accessing the beta API with the SDK, see Use the Microsoft Graph SDKs with the beta API.
# Code snippets are only available for the latest version. Current version is 1.x
from msgraph_beta import GraphServiceClient
from msgraph_beta.generated.directory.inboundshareduserprofiles.item.export_personal_data.export_personal_data_post_request_body import ExportPersonalDataPostRequestBody
# To initialize your graph_client, see https://learn.microsoft.com/en-us/graph/sdks/create-client?from=snippets&tabs=python
request_body = ExportPersonalDataPostRequestBody(
storage_location = "MyStorageAccount",
)
await graph_client.directory.inbound_shared_user_profiles.by_inbound_shared_user_profile_user_id('inboundSharedUserProfile-userId').export_personal_data.post(request_body)
Important
Microsoft Graph SDKs use the v1.0 version of the API by default, and do not support all the types, properties, and APIs available in the beta version. For details about accessing the beta API with the SDK, see Use the Microsoft Graph SDKs with the beta API.