         let createURL = self.url(of: targetPath, modifier: "createUploadSession")
         var createRequest = URLRequest(url: createURL)
         createRequest.httpMethod = "POST"
+        createRequest.setValue(authentication: self.credential, with: .oAuth2)
+        createRequest.setValue(contentType: .json)
         if overwrite {
             createRequest.httpBody = Data(jsonDictionary: ["item": ["@microsoft.graph.conflictBehavior": "replace"] as NSDictionary])
         } else {

        let maximumSize: Int64 = 10_485_760 // Recommended by OneDrive documentations and divides evenly by 320 KiB, max 60MiB.
        var request = URLRequest(url: url)
        request.httpMethod = "PUT"
        
        let finalRange: Range<Int64>
        if let range = range {

            
            if let data = data, let json = data.deserializeJSON(),
                let uploadURL = (json["uploadUrl"] as? String).flatMap(URL.init(string:)) {
                self.upload_multipart(url: uploadURL, operation: operation, size: size, progress: progress, dataProvider: dataProvider, completionHandler: completionHandler)
            }
        }
        createSessionTask.resume()
