Skip to main content

민감도 레이블이 설정된 파일 업로드 불가

클라우드 스토리지에 이미 민감도 레이블 설정된 파일은 graph api에서 업로드하지 못함

같은 문제로 질문을 올린 게시글이 존재함

민감도 레이블이 설정된 파일

테스트

case1

조건

클라우드 스토리지(쉐어포인트) 내의 파일이 레이블이 설정되어 있지 않음 sensitivity_label_upload_02

테스트 결과

createUploadSession 에 성공함

Request

POST /sites/{site-id}/drive/items/{item-id}/createUploadSession

Response(성공)

200 OK

{
"expirationDateTime": "2023-11-15T02:23:05.693Z",
"uploadUrl": "https://socamresearch.sharepoint.com/sites/SaaS/_api/v2.0/drive/items/014IDU5ZIRBKAQWCR4DJDL3PG7OAEDNCKI/uploadSession?guid='2ac39652-3117-4b3c-8f7d-14fb294a11b8'&dc=0&tempauth=eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJhdWQiOiIwMDAwMDAwMy0wMDAwLTBmZjEtY2UwMC0wMDAwMDAwMDAwMDAvc29jYW1yZXNlYXJjaC5zaGFyZXBvaW50LmNvbUA0ZDYxNWFmOS0xZDA0LTRiY2MtOGU2Zi1jNmI2ZmUzMTEwZGQiLCJpc3MiOiIwMDAwMDAwMy0wMDAwLTBmZjEtY2UwMC0wMDAwMDAwMDAwMDAiLCJuYmYiOiIxNzAwMDE0MDg1IiwiZXhwIjoiMTcwMDEwMDQ4NSIsImVuZHBvaW50dXJsIjoiSVhISUswWXVndGlkWTBXdTRhbzNzcENFbFF4UDl1alhvVE5vTHFSeVRkaz0iLCJlbmRwb2ludHVybExlbmd0aCI6IjE2NyIsImlzbG9vcGJhY2siOiJUcnVlIiwiY2lkIjoiZGMzdk01Z3pMRStUazVPdkN1ckxKdz09IiwidmVyIjoiaGFzaGVkcHJvb2Z0b2tlbiIsInNpdGVpZCI6Ik1qSTRNMlpsTnpJdFlUTXdaaTAwWW1JMkxUaGpNMk10TXpCbE0yUmlORE0xWlRWaSIsImFwcF9kaXNwbGF5bmFtZSI6IlNlY3VyaXR5MzY1IiwibmFtZWlkIjoiN2U4MmU3MGQtNDM4Ni00MTlkLTlkZmQtNmM4ZDZlNjA2OGZjQDRkNjE1YWY5LTFkMDQtNGJjYy04ZTZmLWM2YjZmZTMxMTBkZCIsInJvbGVzIjoiZ3JvdXAucmVhZCBhbGxzaXRlcy5yZWFkIGFsbGZpbGVzLndyaXRlIGFsbHByb2ZpbGVzLnJlYWQiLCJ0dCI6IjEiLCJpcGFkZHIiOiIyMC4xOTAuMTQ0LjE3MSJ9.OyKuw3JRuvJxqL9z6HA9-pfQb307IOYl0kCqi-hlhDo",
"nextExpectedRanges": [
"0-"
],
"@odata.context": "https://graph.microsoft.com/v1.0/$metadata#microsoft.graph.uploadSession"
}

파일 업로드에 성공함

Request

PUT https://socamresearch.sharepoint.com/sites/SaaS/_api/v2.0/drive/items/014IDU5ZIRBKAQWCR4DJDL3PG7OAEDNCKI/uploadSession?guid='2ac39652-3117-4b3c-8f7d-14fb294a11b8'&dc=0&tempauth=eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJhdWQiOiIwMDAwMDAwMy0wMDAwLTBmZjEtY2UwMC0wMDAwMDAwMDAwMDAvc29jYW1yZXNlYXJjaC5zaGFyZXBvaW50LmNvbUA0ZDYxNWFmOS0xZDA0LTRiY2MtOGU2Zi1jNmI2ZmUzMTEwZGQiLCJpc3MiOiIwMDAwMDAwMy0wMDAwLTBmZjEtY2UwMC0wMDAwMDAwMDAwMDAiLCJuYmYiOiIxNzAwMDE0MDg1IiwiZXhwIjoiMTcwMDEwMDQ4NSIsImVuZHBvaW50dXJsIjoiSVhISUswWXVndGlkWTBXdTRhbzNzcENFbFF4UDl1alhvVE5vTHFSeVRkaz0iLCJlbmRwb2ludHVybExlbmd0aCI6IjE2NyIsImlzbG9vcGJhY2siOiJUcnVlIiwiY2lkIjoiZGMzdk01Z3pMRStUazVPdkN1ckxKdz09IiwidmVyIjoiaGFzaGVkcHJvb2Z0b2tlbiIsInNpdGVpZCI6Ik1qSTRNMlpsTnpJdFlUTXdaaTAwWW1JMkxUaGpNMk10TXpCbE0yUmlORE0xWlRWaSIsImFwcF9kaXNwbGF5bmFtZSI6IlNlY3VyaXR5MzY1IiwibmFtZWlkIjoiN2U4MmU3MGQtNDM4Ni00MTlkLTlkZmQtNmM4ZDZlNjA2OGZjQDRkNjE1YWY5LTFkMDQtNGJjYy04ZTZmLWM2YjZmZTMxMTBkZCIsInJvbGVzIjoiZ3JvdXAucmVhZCBhbGxzaXRlcy5yZWFkIGFsbGZpbGVzLndyaXRlIGFsbHByb2ZpbGVzLnJlYWQiLCJ0dCI6IjEiLCJpcGFkZHIiOiIyMC4xOTAuMTQ0LjE3MSJ9.OyKuw3JRuvJxqL9z6HA9-pfQb307IOYl0kCqi-hlhDo
Content-Range : bytes 0-3682293/3682294

{file content}
...

Response(성공)

200 OK

{
"@odata.context": "https://socamresearch.sharepoint.com/sites/SaaS/_api/v2.0/$metadata#items/$entity",
"@content.downloadUrl": "https://socamresearch.sharepoint.com/sites/SaaS/_layouts/15/download.aspx?UniqueId=a313943a-ceb8-4c7e-b90d-edab2bf71083&Translate=false&tempauth=eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJhdWQiOiIwMDAwMDAwMy0wMDAwLTBmZjEtY2UwMC0wMDAwMDAwMDAwMDAvc29jYW1yZXNlYXJjaC5zaGFyZXBvaW50LmNvbUA0ZDYxNWFmOS0xZDA0LTRiY2MtOGU2Zi1jNmI2ZmUzMTEwZGQiLCJpc3MiOiIwMDAwMDAwMy0wMDAwLTBmZjEtY2UwMC0wMDAwMDAwMDAwMDAiLCJuYmYiOiIxNzAwMDE0NjI4IiwiZXhwIjoiMTcwMDAxODIyOCIsImVuZHBvaW50dXJsIjoiZ0NJczJMNm55R1A1eS9ENW15bTRPK2pqZXA0S214QklGSFo2aDc2UmpRRT0iLCJlbmRwb2ludHVybExlbmd0aCI6IjEzNSIsImlzbG9vcGJhY2siOiJUcnVlIiwiY2lkIjoib080dkZaVkFBQ0M0WWRqV0tEeDhvdz09IiwidmVyIjoiaGFzaGVkcHJvb2Z0b2tlbiIsInNpdGVpZCI6Ik1qSTRNMlpsTnpJdFlUTXdaaTAwWW1JMkxUaGpNMk10TXpCbE0yUmlORE0xWlRWaSIsImFwcF9kaXNwbGF5bmFtZSI6IlNlY3VyaXR5MzY1IiwibmFtZWlkIjoiN2U4MmU3MGQtNDM4Ni00MTlkLTlkZmQtNmM4ZDZlNjA2OGZjQDRkNjE1YWY5LTFkMDQtNGJjYy04ZTZmLWM2YjZmZTMxMTBkZCIsInJvbGVzIjoiZ3JvdXAucmVhZCBhbGxzaXRlcy5yZWFkIGFsbGZpbGVzLndyaXRlIGFsbHByb2ZpbGVzLnJlYWQiLCJ0dCI6IjEiLCJpcGFkZHIiOiIxMjUuMTMyLjE5OS4zMyJ9.F1Bw_baivZLQ54byT4ZFBj_yxQW_lHdz5ylI0ljr480&ApiVersion=2.0",
"createdBy": {
"user": {
"email": "admin@socam.info",
"id": "1af21560-df4f-4e45-bff3-4f83ced33400",
"displayName": "admin"
}
},
"createdDateTime": "2023-11-15T02:12:44Z",
"eTag": "\"{A313943A-CEB8-4C7E-B90D-EDAB2BF71083},2\"",
"id": "014IDU5ZJ2SQJ2HOGOPZGLSDPNVMV7OEED",
"lastModifiedBy": {
"application": {
"id": "7e82e70d-4386-419d-9dfd-6c8d6e6068fc",
"displayName": "Security365"
},
"user": {
"displayName": "SharePoint 앱"
}
},
"lastModifiedDateTime": "2023-11-15T02:17:07Z",
"name": "111.xlsx",
"parentReference": {
"driveType": "documentLibrary",
"driveId": "b!cv6DIg-jtkuMPDDj20NeW52lh7OHziVDhOv9REAhlUclt1tsaQzrSaxBJyiK8Ma6",
"id": "014IDU5ZMV3CYTEWPK7JBYCZULFB3JQXLR",
"name": "222",
"path": "/drive/root:/222",
"siteId": "2283fe72-a30f-4bb6-8c3c-30e3db435e5b"
},
"webUrl": "https://socamresearch.sharepoint.com/sites/SaaS/_layouts/15/Doc.aspx?sourcedoc=%7BA313943A-CEB8-4C7E-B90D-EDAB2BF71083%7D&file=111.xlsx&action=default&mobileredirect=true",
"cTag": "\"c:{A313943A-CEB8-4C7E-B90D-EDAB2BF71083},3\"",
"file": {
"hashes": {
"quickXorHash": "aSTOIakL1J6W8AbN9YvdeYYBRVE="
},
"irmEffectivelyEnabled": false,
"irmEnabled": false,
"mimeType": "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"
},
"fileSystemInfo": {
"createdDateTime": "2023-11-15T02:12:44Z",
"lastModifiedDateTime": "2023-11-15T02:17:07Z"
},
"shared": {
"effectiveRoles": [
"write"
],
"scope": "users"
},
"size": 3686855
}

문서 업로드가 되어 수정한 사람이 "SharePoint 앱"으로 표기됩니다. sensitivity_label_upload_03

case2

조건

클라우드 스토리지(쉐어포인트) 내의 파일이 이미 레이블이 설정되어 있음 sensitivity_label_upload_04

테스트 결과

createUploadSession 에 성공함

Request

POST /sites/{site-id}/drive/items/{item-id}/createUploadSession

Response(성공)

200 OK

{
"expirationDateTime": "2023-11-15T02:48:45.472Z",
"uploadUrl": "https://socamresearch.sharepoint.com/sites/SaaS/_api/v2.0/drive/items/014IDU5ZIHHNOKSWVRN5DZFC2P4JN4DSJ3/uploadSession?guid='376ecb70-d9a4-4cec-a532-23333b75a3e9'&dc=0&tempauth=eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJhdWQiOiIwMDAwMDAwMy0wMDAwLTBmZjEtY2UwMC0wMDAwMDAwMDAwMDAvc29jYW1yZXNlYXJjaC5zaGFyZXBvaW50LmNvbUA0ZDYxNWFmOS0xZDA0LTRiY2MtOGU2Zi1jNmI2ZmUzMTEwZGQiLCJpc3MiOiIwMDAwMDAwMy0wMDAwLTBmZjEtY2UwMC0wMDAwMDAwMDAwMDAiLCJuYmYiOiIxNzAwMDE1NjI1IiwiZXhwIjoiMTcwMDEwMjAyNSIsImVuZHBvaW50dXJsIjoiTSs3UWxmNHVpLzFIa2Zrd3FRRW5NTCs0anhiZmNlQ0JKalVxWjRqNTMrVT0iLCJlbmRwb2ludHVybExlbmd0aCI6IjE2NyIsImlzbG9vcGJhY2siOiJUcnVlIiwiY2lkIjoidWlabkRPbkZBa1d2WEZ6Ri9LdXNOZz09IiwidmVyIjoiaGFzaGVkcHJvb2Z0b2tlbiIsInNpdGVpZCI6Ik1qSTRNMlpsTnpJdFlUTXdaaTAwWW1JMkxUaGpNMk10TXpCbE0yUmlORE0xWlRWaSIsImFwcF9kaXNwbGF5bmFtZSI6IlNlY3VyaXR5MzY1IiwibmFtZWlkIjoiN2U4MmU3MGQtNDM4Ni00MTlkLTlkZmQtNmM4ZDZlNjA2OGZjQDRkNjE1YWY5LTFkMDQtNGJjYy04ZTZmLWM2YjZmZTMxMTBkZCIsInJvbGVzIjoiZ3JvdXAucmVhZCBhbGxzaXRlcy5yZWFkIGFsbGZpbGVzLndyaXRlIGFsbHByb2ZpbGVzLnJlYWQiLCJ0dCI6IjEiLCJpcGFkZHIiOiIyMC4xOTAuMTQ0LjE3MiJ9.BD4TUMNYSuoQxs2im4gf17Q3m01OLEXIYUTNI9UgTTU",
"nextExpectedRanges": [
"0-"
],
"@odata.context": "https://graph.microsoft.com/v1.0/$metadata#microsoft.graph.uploadSession"
}

파일 업로드에 실패함

Request

PUT https://socamresearch.sharepoint.com/sites/SaaS/_api/v2.0/drive/items/014IDU5ZIHHNOKSWVRN5DZFC2P4JN4DSJ3/uploadSession?guid='376ecb70-d9a4-4cec-a532-23333b75a3e9'&dc=0&tempauth=eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJhdWQiOiIwMDAwMDAwMy0wMDAwLTBmZjEtY2UwMC0wMDAwMDAwMDAwMDAvc29jYW1yZXNlYXJjaC5zaGFyZXBvaW50LmNvbUA0ZDYxNWFmOS0xZDA0LTRiY2MtOGU2Zi1jNmI2ZmUzMTEwZGQiLCJpc3MiOiIwMDAwMDAwMy0wMDAwLTBmZjEtY2UwMC0wMDAwMDAwMDAwMDAiLCJuYmYiOiIxNzAwMDE1NjI1IiwiZXhwIjoiMTcwMDEwMjAyNSIsImVuZHBvaW50dXJsIjoiTSs3UWxmNHVpLzFIa2Zrd3FRRW5NTCs0anhiZmNlQ0JKalVxWjRqNTMrVT0iLCJlbmRwb2ludHVybExlbmd0aCI6IjE2NyIsImlzbG9vcGJhY2siOiJUcnVlIiwiY2lkIjoidWlabkRPbkZBa1d2WEZ6Ri9LdXNOZz09IiwidmVyIjoiaGFzaGVkcHJvb2Z0b2tlbiIsInNpdGVpZCI6Ik1qSTRNMlpsTnpJdFlUTXdaaTAwWW1JMkxUaGpNMk10TXpCbE0yUmlORE0xWlRWaSIsImFwcF9kaXNwbGF5bmFtZSI6IlNlY3VyaXR5MzY1IiwibmFtZWlkIjoiN2U4MmU3MGQtNDM4Ni00MTlkLTlkZmQtNmM4ZDZlNjA2OGZjQDRkNjE1YWY5LTFkMDQtNGJjYy04ZTZmLWM2YjZmZTMxMTBkZCIsInJvbGVzIjoiZ3JvdXAucmVhZCBhbGxzaXRlcy5yZWFkIGFsbGZpbGVzLndyaXRlIGFsbHByb2ZpbGVzLnJlYWQiLCJ0dCI6IjEiLCJpcGFkZHIiOiIyMC4xOTAuMTQ0LjE3MiJ9.BD4TUMNYSuoQxs2im4gf17Q3m01OLEXIYUTNI9UgTTU
Content-Range : bytes 0-3682293/3682294

{file content}
...

Response(실패)

403 Forbidden
{
"error": {
"code": "notAllowed",
"message": "This operation has been disabled by policy"
}
}

결론

  • 클라우드 스토리지 내의 이미 민감도 레이블이 설정된 파일은 Graph API로 파일 업로드가 불가합니다.
  • 같은 레이블이 적용된 문서로도 업로드가 불가합니다.