Forum Widgets
Latest Discussions
Suggestion: URL scheme for onedrive synced locations
For a sharepoint site on the web, URLs are straightforward https:// ENTERPRISETENANT .sharepoint.com/sites/ SITENAME / LIBRARY Right now, if you need to coach someone through using a file in a way that requires syncing a folder, it's just a little too difficult. In the interest of making it more possible for coworkers to provide practical instructions to each other, we would really benefit from having a way to link files the implies use of an existing sync or onedrive shortcut, and which falls back to suggest creating a new one. Currently, we have to hope that our colleagues are using sharepoint site syncing the way that we hope they are, if we want to provide really specific context for things. e.g. If my relative path is %USERPROFILE%/My Enterprise Tenant name/SITENAME - Documents/project1 someone else's could be %USERPROFILE%/My Enterprise Tenant name/SITENAME - project1 OR %USERPROFILE%/OneDrive - My Enterprise Tenant name/Documents/project1 OR %USERPROFILE%/OneDrive - My Enterprise Tenant name/project1 Suppose we had new updates of OneDrive that set up a URL scheme that gets attached to an executable interpreter, and the interpreter takes what are otherwise the elements of an absolute https URL, but instead of opening a browser, it would compare it against the locally synced path (i.e. information from the "Accounts" settings). If there's a match, it could then link to a location on disk (probably via some kind of consent screen as an intermediate): -x-ms-onedrivesync://ENTERPRISETENANT.sharepoint.com/sites/SITENAME/LIBRARY/PATH/ If the URL is not represented among the onedrive folders that are synced, so far, then onedrive could propose that the user start syncing this folder, instead. I really prefer the idea of treating a "onedrive shortcut" and a "sync" folder the same, as long as it's for an equivalent location in the cloud. This got really confusing to explain to people, once the "shortcut" feature was introduced. Please? It would make things a lot easier. Does anything like this already exist? Is there a tool or a best practice that IT support at "work or school" organizations are already using to explain and talk about such things?Jack_EidsmsnessJul 28, 2025Brass Contributor43Views0likes0CommentsSize 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!fsdevFeb 11, 2025Copper Contributor51Views0likes0CommentsWhat do I need to connect OneDrive with non-Azure cloud using webhooks?
Currently, I have a Dropbox shared folder connected with AWS processing pipeline via webhooks. In this setup, every time a user authenticated by Dropbox makes a change in the Dropbox folder, an AWS Lambda is triggered to download the changed file to AWS infrastructure and do some computations there. Now, our partner requested Dropbox to be replaced with OneDrive, but to keep the existing AWS pipeline for processing. Thus, a question arises: what would be sufficient to connect existing AWS infrastructure with OneDrive shared folder (after every change to a file in OneDrive the file has to be sent to AWS)? What should I recommend to our partner for this use case? Especially: - should I recommend the "OneDrive for business" license? - is a stand-alone OneDrive license enough to utilize webhooks or are additional solutions like Azure needed? Please note that the relationship with the partner is a formal one, so I can't change my recommendation. Also, for unrelated reasons I am unable to set up my own account, prototype and check for myself, as I normally would. In the future I will be able to make additional recommendations when specification changes, so there isn't any problem with changing the license to a higher one later on. Research I've done so far: - I've read the [OneDrive API documentation on webhooks](https://learn.microsoft.com/en-us/onedrive/developer/rest-api/concepts/using-webhooks), but it is unclear to me what pre-requisites I need to set this up. Especially, is it supported on every license? - The onedrive-webhooks-aspnet repo on GitHub lists prerequisites, but since the README.md was updated 6 years ago, I am unsure how up-to-date it is. It advises to use OneDrive Personal registered with the Microsoft registration portal or OneDrive for Business with Microsoft Azure Active Directory and Office 365 app registration tool. The links do not work, though. - There is also a fairly recent guide on rollout.com on implementing webhooks in OneDrive, but it relies on Microsoft Graph. Is Microsoft Graph a necessity? Any additional links to resources on how to set this up are welcomed :)pawelkamFeb 05, 2025Copper Contributor81Views0likes0CommentsUpload files to onedrive personal using python on non-interactive method
As part of my python project, I need to upload a file to onedrive personal folder non-interactive way. I have created an app registration in Azure provided below API permissions: Account Type: Accounts in any organizational directory (Any Microsoft Entra ID tenant - Multitenant) and personal Microsoft accounts (e.g. Skype, Xbox) API Permissions: Python code: import requests # Replace with your details client_id = 'xxxxxx' client_secret = 'xxxxx' tenant_id = 'xxxxx' filename = 'C:/ABB_2025-01-13.csv' onedrive_folder = 'CloudOnly/test' user_id = 'c19d6ba9-e7d1-xxxxx-xxxxxx' # Get the access token url = f'https://login.microsoftonline.com/{tenant_id}/oauth2/v2.0/token' data = { 'grant_type': 'client_credentials', 'client_id': client_id, 'client_secret': client_secret, 'scope': 'https://graph.microsoft.com/.default' } response = requests.post(url, data=data) token = response.json().get('access_token') # Upload the file to OneDrive headers = { 'Authorization': f'Bearer {token}', 'Content-Type': 'application/octet-stream' } file_content = open(filename, 'rb').read() upload_url = f'https://graph.microsoft.com/v1.0/users/{user_id}/drive/root:/{onedrive_folder}/{filename.split("/")[-1]}:/content' upload_response = requests.put(upload_url, headers=headers, data=file_content) if upload_response.status_code == 201: print('File uploaded successfully!') else: print('Error uploading file:', upload_response.json()) Error: Error uploading file: {'error': {'code': 'BadRequest', 'message': 'Tenant does not have a SPO license.', 'innerError': {'date': '2025-01-14T02:15:47', 'request-id': 'cf70193e-1723-44db-9f5e-xxxxxxx', 'client-request-id': 'cf70193e-1723-44db-9f5e-xxxxxxx'}}} How to resolve this ?acrJan 14, 2025Copper Contributor174Views0likes0Commentspersonal 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-apiharrison222Dec 23, 2024Copper Contributor150Views0likes0Commentssome account can't upload files to Onedrive.
Some previously created accounts cannot upload files to OneDrive, but newly created accounts can. The uploadurl for the old account is“ https://my.microsoftpersonalcontent.com/personal........”,while the upload address for new account is “https://api.onedrive.com/rup/........”,and I didn't send the Authorization header and bearer token when i issue the POST or PUT call. I only send it when I issue the GETcall.is anyone know why and how can I solve it?underwoodDec 18, 2024Copper Contributor147Views0likes0CommentsApp 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....DavidLilleyDec 13, 2024Copper Contributor127Views1like0CommentsFile handler configuration does not update
Hi team, We recently had an integration with Microsoft file handler. During the deployment of the application, we encountered some issues, so we updated the file handler configuration via the manifest file. Some users who installed our application still see the old file handler configuration and are experiencing problems because of it. They want to either update it to the latest configuration or remove it completely so they can continue their work normally. We did try to guide them to reset the file handler cache as in: https://learn.microsoft.com/en-us/onedrive/developer/file-handlers/reset-cache?view=odsp-graph-online But seems like only some of them got the updated config, while the rest keep getting the old one, even after 1-2 weeks. Do you have any advice on how to completely resolve this issue?lumin_adminNov 29, 2024Copper Contributor102Views0likes0CommentsOnedrive Share Popup box
We have deployed the App Locker policy via Active Directory Group Policy and have whitelisted all OneDrive paths and applications as publishers. Everything seems to be working, except for the "Share" pop-up box, which remains empty. Please let me know which application and path need to whitelist for resolve this concern. https://filestore.community.support.microsoft.com/api/images/84390ebf-d302-4015-8ff6-723ae2b00af1?upload=true&fud_access=hC1SxZhn7m%2FZQJkOIiOVstu10yTQgXS4A%2FDBzZTg8nbaCgIogkrcDydMeI5Y4za2dOqDdWtsG2JNS3E35V60i9TiGHR7STMpJHheeXuDvO8nwjUlqCBHhJ0NDvuYN7OSsi8XAMNbcvjY8Jl35xJIDMlQpdAs%2BPBtE76aaH2SBTIc9TGMou9fME3wm4Fqdf9vzuQKLKVO33xuHRgsIbZ%2FYzoQbWXQYwmFDCnjYobtz56h1yJVfh%2F6IvKz8JfYTr0D4M7r6NM4Ck%2FeDzsAJjWw3X66fFgOTsXjM8id6zzQKbU4dHgHMt3TQBDnOu%2BayTc64rPs9aG4UXMNg8o9RDP2QZ4Gu%2BKz0cZbCIWWzkqkxYY9Uk%2FmAOooFDe39DEN23Goa8lH3RZ%2FHp3F558qgCwe31F7EZkK5OUD9g1thuXoSYE%3DsachinametaNov 06, 2024Copper Contributor40Views0likes0CommentsOneDrive container cTag property stopped changing
Hi, According to the docs: DriveItem - OneDrive API - OneDrive dev center | Microsoft Learn "The cTag value is modified when content or metadata of any descendant of the folder is changed. " I am using graph Api to monitor changes in one of my folders. Indeed this used to work as described but suddenly cTag property remains constant. It will not respond to changes in sub folder files, adding files, deleting files or modifying fild in sub folders no longer causes the parent folder cTag to change. Thanks, GarygaryharpazNov 04, 2024Microsoft59Views0likes0Comments