apis
78 TopicsWhy isn't there a PowerShell module for OneDrive?
Out of all the various applications that Microsoft produce, OneDrive stands out as an anomaly. Where is the PowerShell module for managing it? Some very simple requirements by developers are simply missing. A very simple one - can I test whether OneDrive is still synchronising and therefore I have to wait before my program/script progresses so that I'm sure we've got the latest versions or won't suddenly get "Cloud provider not running". OneDrive has been around years, this really perplexes me...91Views7likes6CommentsCongratulations, Microsoft products couldn't have been worse even if you tried.
I was thinking why should I bother posting about this, who would read it, and would it make Microsoft any better if someone reads this? But the world would never improve if no one reports this kind of bad design. So here we go. Why make it so hard to sign up for Azure, register an app, set up permissions, register an app in the MDN (whatever the F it stands for), just to be able to connect to build an ETL job that pulls from multi-tenant onedrive. Why so much text everywhere that it becomes unreasonable to read and find information that matters. Why pretend you have an AI called Copilot when it doesn't have access to data and all it does is spit back information from the docs. How to fix this? Put yourself in the shoes of someone new who's integrating Microsoft products for the first time. No assumptions. No required prior knowledge. Less text, straight to the point. No weird error messages with complicated Error IDs. If no one understands them, why bother bloat the limited screen space with it? Why not have an actual AI that can give concrete pointers instead of showing a link to a generic documentation page? This could go on, but I'm gonna practice what I preach and get straight to the point with the suggestions above. The only moat Microsoft has is the heavy corporate contracts that bind stupid corporations to use Microsoft products and services. The moment a new provider with simpler/faster/cheaper services shows up, developers and people working day-to-day with Microsoft services will gladly migrate over. My 2-cent bottle in the sea.126Views4likes2CommentsUploading files to OneDrive Personal via API fails when filename starts with "Windows"
Hi everyone, We've encountered a strange issue with our backup tool that affects random users. Files with names starting with "Windows" (e.g., Windows.gif) fail to upload to OneDrive Personal accounts, regardless of whether we're using: Simple Item Upload (PUT request) Resumable Item Upload (POST to create an upload session) Both methods return a 404 Not Found error. Details: Simple Upload Fails after the PUT completes. Resumable Upload Fails during the session creation call. No issues with filenames not starting with "Windows." A similar unresolved issue was reported https://github.com/OneDrive/onedrive-api-docs/issues/1785. Sample Request & Response: Simple Upload: PUT /v1.0/drive/items/{item-id}:/Windows.gif:/content Authorization: Bearer [token] Host: api.onedrive.com Response: HTTP/1.1 404 Not Found Payload: json { "error": { "code": "itemNotFound", "message": "Item does not exist" } } Resumable Upload: bash POST /v1.0/drive/items/{item-id}:/Windows.gif:/upload.createSession Authorization: Bearer [token] Content-Type: application/json Response: HTTP/1.1 404 Not Found Payload: json { "error": { "code": "itemNotFound", "message": "Item does not exist" } } Key Observations: Random Accounts Affected: Issue occurs inconsistently across different OneDrive Personal accounts. No Request ID: Failed responses lack request IDs, making tracing difficult. Inconsistent Reproduction: I can't reproduce it on my account, but my colleague can. Uploading the same file via the OneDrive web interface works fine. Trying to force URL-encode the filename in the request results in the same error Questions: Has anyone encountered this before? Could this be related to reserved keywords or API filtering rules? Any advice on debugging this further, given the lack of request IDs? Thanks.125Views0likes1CommentFile close event
Hello, I have been looking for finding different technique by which i can know that i file was closed by different users after collaboration. There webhooks, however it send only updated event and there is no webhook event closed or not in use or latest in OneDrive. I want this event take the file from OneDrive and send across some workflow. Is there a way by which this can be done? Also file will be opened by different user in browser or desktop. Thanks Developer70Views0likes1CommentOneDrive direct download link
Hi, We have tried to get direct download link or to access publicly shared drive file with Graph API . It seems that the the URL structure has changed as well as the API. The thing behind the API is that i cant access file though https://graph.microsoft.com/v1.0/shares/{sharedDriveItem-id} this endpoint since when i get the link and try to encode it to get sharedDriveItem-id the response is that the "The sharing link no longer exists, or you do not have permission to access it.". Anyone has any idea how to get direct download URL from initial public share URL give by someone? Thank you.333Views1like1CommentSize Discrepancy Between /drives & /root Endpoints
To preface this post, please view the below link. https://learn.microsoft.com/en-us/answers/questions/1257868/microsoft-onedrive-drive-size-is-different-in-driv When retrieving the total size of a drive via the /drives endpoint - one gets a response as follows. { "deleted": 3143, "remaining": 212025579370, "state": "normal", "total": 1099511627776, "used": 887486045263 } When retrieving the same drive via its /drives/{id}/root endpoint - it returns the following metric. "size": 75217259136 The 'used' metric matches the Microsoft Admin Center OneDrive usage panel. The 'size' metric matches the actual downloaded size of the drive. What is the cause for a discrepancy of 800 GB? A response to the other post details, "The difference between the two values is the additional space used by the system." Could I have some specifics of where I could acquire this system data (or at the very least view some metadata for it)? Thanks!50Views0likes0Commentspersonal account can't search files
hello,recently I found that personal account can't search files by GET /me/drive/root/search(q='{search-text}') . I am sure the target file exist in OneDrive. I can access it by GET /me/drive/root/children. is anyone know why and how can I solve it? here are my personal account testing result screenshot: the folder named "Documents" is exist. and the search result is a empty array also, here are communications records in Microsoft Q&A: https://learn.microsoft.com/zh-cn/answers/questions/2133894/onedrive-rest-api150Views0likes0CommentsApp Folder is being named "Graph"
There is an issue where the App Folder is being named "Graph" instead of the intended Application Name for some users, specifically those uploading to "my.microsoftpersonalcontent.com." Scenario: 1 A user logs in to the application and OneDrive via OAuth. 2 The user uploads a file to OneDrive. Expected Outcome: The file should be uploaded to /apps/**MyApp**/SomeFile.txt Actual Outcome: The file is uploaded to /apps/**Graph**/SomeFile.txt The upload process utilizes the following special URL: OneDrive API: Get Special Folder https://learn.microsoft.com/en-us/onedrive/developer/rest-api/api/drive_get_specialfolder?view=odsp-graph-online The request is made using: POST https://graph.microsoft.com/v1.0/me/drive/special/approot:/SomeFile.txt:/createUploadSession This returns a URL for posting the upload: https://my.microsoftpersonalcontent.com/personal/XXXXXXX/_api/v2.0/drive/items/YYYYYYYY/uploadSession?guid='XXXXX4-4YYYY-bCCCDDDDDDD'&overwrite=True&rename=False&dc=0&tempauth=d3f4f4f4f4f....123Views1like0CommentsUrl encoded folder names not decoded on server end
When using the OneDrive API I am url encoding the file names so for example a file with a plus or hash symbol would get encoded the the percent symbol escape sequence. This works correctly for files and they are created on OneDrive with the correct characters. When I create a folder this does not work correctly. I encode the name in the same way but when the folder is created on OneDrive it still contains the percent symbol so it seems not to be decoding server side. Does anyone know how to fix this? ThanksSolved277Views0likes2Comments