Perform file upload - Cloud Discovery API


Microsoft Defender for Cloud Apps is now part of Microsoft 365 Defender, which correlates signals from across the Microsoft Defender suite and provides incident-level detection, investigation, and powerful response capabilities. For more information, see Microsoft Defender for Cloud Apps in Microsoft 365 Defender.

Upload the file contents by performing an HTTP PUT request. You will be required to use the URL returned by the Initiate file upload request.


  • You can upload individual files of up to 5 GB. If you need to upload larger files, break the Cloud Discovery data into multiple chunks.
  • If you do not know which environment you are running, check the Initiate file upload request, which returns this information.

HTTP request

PUT https://<initiate_file_upload_response_url>


For Azure:

  • If your file is under 64 MB, add the header "x-ms-blob-type: BlockBlob" to your request.
  • If your file size is greater than 64MB, upload it in chunks. the easiest way to do this is using the Azure SDK.



Here is an example of the request for Azure.

curl --request PUT --upload-file <file_to_upload_full_path> -H "x-ms-blob-type: BlockBlob" "https://<initiate_file_upload_response_url>"

Here is an example of the request for Azure Java SDK.

File fileReference = new File("");
// Create a blob using the URI that contains the shared access signature.
CloudBlockBlob sasBlob = new CloudBlockBlob(uri);

// Upload the file to the blob.
sasBlob.upload(new FileInputStream(fileReference), fileReference.length());

If you run into any problems, we're here to help. To get assistance or support for your product issue, please open a support ticket.