Edit

Share via


Create customDataProvidedResourceUploadSession

Namespace: microsoft.graph

Important

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.

Create a new customDataProvidedResourceUploadSession object.

This API is available in the following national cloud deployments.

Global service US Government L4 US Government L5 (DOD) China operated by 21Vianet

Permissions

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) EntitlementManagement.ReadWrite.All Not available.
Delegated (personal Microsoft account) Not supported. Not supported.
Application EntitlementManagement.ReadWrite.All Not available.

Tip

In delegated scenarios with work or school accounts, the signed-in user must also be assigned an administrator role with supported role permissions through one of the following options:

In app-only scenarios, the calling app can be assigned one of the preceding supported roles instead of the EntitlementManagement.ReadWrite.All application permission. The Catalog owner role is less privileged than the EntitlementManagement.ReadWrite.All application permission.

For more information, see Delegation and roles in entitlement management and how to delegate access governance to access package managers in entitlement management.

HTTP request

POST /identityGovernance/entitlementManagement/accessPackageCatalogs/{accessPackageCatalogId}/accessPackageResources/{accessPackageResourceId}/uploadSessions

Request headers

Header Value
Authorization Bearer {token}. Required. Learn more about authentication and authorization.
Content-Type application/json. Required.

Request body

In the request body, supply a JSON representation of the customDataProvidedResourceUploadSessionRequest object.

You can specify the following properties when creating a customDataProvidedResourceUploadSession.

Property Type Description
source String The name of the Custom Data Provided Resource for which the customer is uploading data. Required.
type String The odata type representing the columns of the CSV that are expected to be uploaded in this session. The possible values are: accessReviewDataUploadTriggerCallbackData. Required.
data accessReviewResourceDataUploadSessionContextData Contains information about the access review definition and access review instance for which the data is being uploaded. Required.

Response

If successful, this method returns a 201 Created response code and a customDataProvidedResourceUploadSession object in the response body.

Examples

Request

The following example shows a request.

POST https://graph.microsoft.com/beta/identityGovernance/entitlementManagement/accessPackageCatalogs/6f4b1c6f-2a3d-4f8e-9b7a-5c1e2d3f4a6b/accessPackageResources/7b8a1c6f-2a3d-4f8e-9b7a-5c1e2d3f4a6b/uploadSessions
Content-Type: application/json

{
"source": "BuildingAccessData",
"type":  "#microsoft.graph.accessReviewDataUploadTriggerCallbackData",
"data": {
    "accessReviewId": "9e4b1c6f-2a3d-4f8e-9b7a-5c1e2d3f4a6b",
    "accessReviewInstanceId": "6a9b1c6f-2a3d-4f8e-9b7a-5c1e2d3f4a6b"
}
}

Response

The following example shows the response.

Note: The response object shown here might be shortened for readability.

HTTP/1.1 201 Created
Content-Type: application/json

{
    "id": "23f27c15-72f9-45fe-9e9c-e3d8f75bdc44",
    "status": "Active",
    "isUploadDone": false,
    "stats": {
        "filesUploaded": 0,
        "totalBytesUploaded": 0,
    },
    "files": [],
    "createdDateTime": "2024-03-06T01:35:12.123Z",
    "expirationDateTime": "2024-03-07T01:35:12.123Z"
}