{"revision":"c10276e953456835cdbb1f3a60d58ae1980be353","document":{"id":21333,"path":"integrate-applications/integration-hub/onedrive-spoke.md","title":"Microsoft OneDrive Spoke","bundle":null,"doc_type":null,"release":"australia","body":"\n# Microsoft OneDrive Spoke\n\nAutomate file and folder management and collaboration in Microsoft OneDrive. Adds Microsoft OneDrive data to your ServiceNow instance.\n\n## Request apps on the Store\n\nVisit the [ServiceNow Store](https://store.servicenow.com/sn_appstore_store.do#!/store/home) to view all the available apps, and for information about submitting requests to the store. For cumulative release notes information for all released apps, see the [ServiceNow Store version history release notes](https://www.servicenow.com/docs/r/store-release-notes/sn-store-release-notes.html).\n\n## Integration Hub subscription\n\nThis spoke requires an Integration Hub subscription. For more information, see [Legal schedules - IntegrationHub overview](https://www.servicenow.com/content/dam/servicenow-assets/public/en-us/doc-type/legal/snc-addendum-integrationhub.pdf).\n\n## Spoke version\n\nMicrosoft OneDrive spoke v2.9.1 is the latest version. For version history of the spoke, see [Microsoft OneDrive spoke release notes](https://www.servicenow.com/docs/r/store-release-notes/store-integrationhub-rn-onedrive-spoke.html).\n\n## Spoke dependencies\n\nIf you’re having trouble installing the app, ensure that these dependent plugins are installed:\n\n-   ServiceNow IntegrationHub Action Step - REST \\(com.glide.hub.action\\_step.rest\\)\n-   ServiceNow IntegrationHub Runtime \\(com.glide.hub.integration.runtime\\)\n\n**Note:** Some of these plugins are licensable features and require an appropriate license if used outside the spoke implementation. For information on licenses, contact your account manager.\n\n## Supported versions\n\nAPI version v1.\n\n## Spoke flows\n\nThe Microsoft OneDrive spoke gives sample flows in the draft state to demonstrate automating Microsoft OneDrive tasks. To customize a sample flow, copy it to a new application scope. Available sample flows include:\n\n|Flow|Description|\n|----|-----------|\n|Renew Subscriptions|Renews the expired subscriptions by updating the expiration date of the subscription.|\n\n## Spoke subflows\n\nThe Microsoft OneDrive spoke provides sample subflows in the draft state to demonstrate automating Microsoft OneDrive tasks. To customize a sample subflow, copy it to a new application scope. Available sample subflows include:\n\n|Subflow|Description|\n|-------|-----------|\n|Download New OneDrive File to ServiceNow|Downloads the new files uploaded in a resource to a ServiceNow record|\n|Subscribe to Webhook|Subscribes a listener application to receive notifications when data changes.|\n|Sync Changes|Tracks changes to a drive and its children over time.|\n|Get Document Latest URL|Gets the latest path of a file in OneDrive using the Sys ID of the document as an input. To use this subflow, a corresponding OneDrive connection and credential must be created, and a OneDrive authorization token should be available.|\n|Reconnect Document from Microsoft OneDrive|Gets the latest web URL and webdav URL of a document from the Microsoft OneDrive by using the Document Sys ID, Provider Detail Sys ID, Target Table Name, Target Table Sys ID, and the Document Name. To use this subflow, a corresponding OneDrive connection and credential must be created, and a OneDrive authorization token must be available.|\n\n## Spoke actions\n\nThe Microsoft OneDrive spoke provides actions to automate Microsoft OneDrive tasks when events occur in ServiceNow. Available actions include:\n\n<table id=\"table_gsq_2gt_kfb\"><thead><tr><th>\n\nCategory\n\n</th><th>\n\nAction\n\n</th><th>\n\nDescription\n\n</th></tr></thead><tbody><tr><td>\n\nDrive Management\n\n</td><td>\n\nLook up Drive Info\n\n</td><td>\n\nGets the metadata of a specific Microsoft OneDrive drive\n\n</td></tr><tr><td rowspan=\"4\">\n\nFolder Management\n\n</td><td>\n\nMove File Or Folder Item\n\n</td><td>\n\nMoves a file or folder in Microsoft OneDrive to the target location.\n\n</td></tr><tr><td>\n\nCreate Folder\n\n</td><td>\n\nCreates a folder in Microsoft OneDrive.\n\n</td></tr><tr><td>\n\nUpdate File Or Folder Name\n\n</td><td>\n\nUpdates the name for a file or folder item by ID.\n\n</td></tr><tr><td>\n\nDelete File Or Folder Item\n\n</td><td>\n\nDeletes a file or folder from Microsoft OneDrive.\n\n</td></tr><tr><td rowspan=\"15\">\n\nFile Management\n\n</td><td>\n\nCheck In File\n\n</td><td>\n\nChecks in a drive item and sends a sharing invitation. When you check in a file, other users can access the checked-in file.\n\n</td></tr><tr><td>\n\nCheck Out File\n\n</td><td>\n\nChecks out a drive item from OneDrive. When you check out a drive item, other users cannot edit the document. Other users also cannot see the changes that you made in the document until you check in the document.\n\n</td></tr><tr><td>\n\nCopy OneDrive File to Attachment\n\n</td><td>\n\nCopies a file in Microsoft OneDrive to an attachment in a record in a ServiceNow record.\n\n</td></tr><tr><td>\n\nCopy Attachment to OneDrive\n\n</td><td>\n\nCopies an attachment record in ServiceNow to Microsoft OneDrive\n\n</td></tr><tr><td>\n\nCopy File Or Folder Item\n\n</td><td>\n\nAsynchronously creates a copy of a Microsoft OneDrive item \\(including children\\), under a new parent item or with a new name.\n\n</td></tr><tr><td>\n\nLook up Items\n\n</td><td>\n\nRetrieves a list of drive items from a path or the source and source ID of a drive item.\n\n</td></tr><tr><td>\n\nLook up File Or Folder Item Info By ID\n\n</td><td>\n\nGets file metadata information from the file or folder ID in Microsoft OneDrive.\n\n</td></tr><tr><td>\n\nLook up File Or Folder Item Info By Path\n\n</td><td>\n\nGets file metadata information from the file path in Microsoft OneDrive.\n\n</td></tr><tr><td>\n\nCopy Attachment To OneDrive Using Path\n\n</td><td>\n\nCopies an attachment record in ServiceNow to OneDrive.\n\n</td></tr><tr><td>\n\nCopy OneDrive File To Attachment Using File Path\n\n</td><td>\n\nCopies a file using its path in OneDrive to an attachment in a record in ServiceNow.\n\n</td></tr><tr><td>\n\nCopy OneDrive File Version To Attachment\n\n</td><td>\n\nCopies a file in OneDrive to an attachment in a record in ServiceNow.\n\n</td></tr><tr><td>\n\nDelete Version of a File\n\n</td><td>\n\nDeletes the specified version of a file from OneDrive.\n\n</td></tr><tr><td>\n\nLook up All Versions of a File\n\n</td><td>\n\nRetrieves all the versions a file in OneDrive.\n\n</td></tr><tr><td>\n\nRestore File Version\n\n</td><td>\n\nRestores the specified file version and make this version the latest.\n\n</td></tr><tr><td>\n\nUpload and Replace File\n\n</td><td>\n\nUploads the updated version of an existing file or replaces the existing file with a new file. **Note:** The maximum size of the file cannot exceed 4 MB.\n\n</td></tr><tr><td>\n\nSearch Documents\n\n</td><td>\n\nSearch Files or Folder Items\n\n</td><td>\n\nSearches the drive items \\(files or folders\\) based on metadata attributes such as the item name.\n\n</td></tr><tr><td rowspan=\"3\">\n\nDocument Sharing\n\n</td><td>\n\nAdd Collaborator\n\n</td><td>\n\nAdds a collaborator and their permissions to a file or a folder. You can identify the collaborator by their Azure AD Alias or an Object ID.\n\n</td></tr><tr><td>\n\nLook up Collaborators\n\n</td><td>\n\nLists all the collaborator details associated with a file or folder in Microsoft OneDrive.\n\n</td></tr><tr><td>\n\nRemove Collaborator\n\n</td><td>\n\nRemoves a collaborator from a file or folder in Microsoft OneDrive.\n\n</td></tr><tr><td rowspan=\"5\">\n\nPermission Management\n\n</td><td>\n\nAdd Permission\n\n</td><td>\n\nSends a sharing invitation for a drive item. A sharing invitation allows the recipients to access the drive item and optionally sends them an email with a sharing link.\n\n</td></tr><tr><td>\n\nCreate Sharing Link\n\n</td><td>\n\nCreates a sharing link which allows you to share a drive item with other users.\n\n</td></tr><tr><td>\n\nDelete Permission\n\n</td><td>\n\nRemoves access to a drive item.\n\n</td></tr><tr><td>\n\nLook up Permissions\n\n</td><td>\n\nRetrieves the sharing permissions of a drive item.\n\n</td></tr><tr><td>\n\nUpdate Permission\n\n</td><td>\n\nUpdates the expiration date of the subscription.\n\n</td></tr><tr><td rowspan=\"6\">\n\nWebhook Management\n\n</td><td>\n\nSubscribe Webhook\n\n</td><td>\n\nCreates a subscription that sends notifications when data changes.\n\n</td></tr><tr><td>\n\nUnsubscribe Webhook\n\n</td><td>\n\nDeletes the specified subscription ID.\n\n</td></tr><tr><td>\n\nGet SyncToken for Subscription\n\n</td><td>\n\nRetrieves the latest sync token for the specified subscription ID.\n\n</td></tr><tr><td>\n\nLook up Subscriptions\n\n</td><td>\n\nRetrieves the list of active subscriptions.\n\n</td></tr><tr><td>\n\nRenew Subscription\n\n</td><td>\n\nUpdates the expiration date of the subscription.\n\n</td></tr><tr><td>\n\nSync Changes\n\n</td><td>\n\nTracks changes to a drive and drive's children over time.\n\n</td></tr></tbody>\n</table>## Available AI agents\n\nInstall Now Assist for Integration Hub and start using the available AI agents. For more information, see [ServiceNow Otto for Integration Hub](https://raw.githubusercontent.com/ServiceNow/ServiceNowDocs/australia/markdown/australia/integrate-applications/integration-hub/now-assist-spokes.md).\n\nThis spoke provides standalone AI agents that mimic human-like intelligence to perform tasks in your ServiceNow instance.\n\n-   In the ServiceNow agentic system, you can create an agentic workflow that comprises of a set of large language model \\(LLM\\) instructions along with one or more standalone AI agents to execute an objective. See [Create an agentic workflow](https://raw.githubusercontent.com/ServiceNow/ServiceNowDocs/australia/markdown/intelligent-experiences/configure-use-case-ai-agents.md) for information about adding AI agents to create agentic workflows as per your requirement and provide the required trigger.\n\n    You can also search for other available AI agents and add them to your agentic workflow. See [Find AI agents](https://raw.githubusercontent.com/ServiceNow/ServiceNowDocs/australia/markdown/intelligent-experiences/find-ai-agents.md) for more information.\n\n-   You can create a clone of the required spoke AI agent and customize it as per your requirement. See [Duplicate an AI agent](https://raw.githubusercontent.com/ServiceNow/ServiceNowDocs/australia/markdown/intelligent-experiences/clone-ai-agent.md) for more information about creating a clone.\n-   See [AI Agent Studio \\(legacy\\)](https://raw.githubusercontent.com/ServiceNow/ServiceNowDocs/australia/markdown/intelligent-experiences/na-ai-agents.md) for information about AI agents.\n\nAvailable AI agents include:\n\n|AI Agent|Description|\n|--------|-----------|\n|Microsoft OneDrive sharing management AI agent|Adds or removes a collaborator and manages their permissions for a file or folder in Microsoft OneDrive. Also, lists all the collaborator details associated with a file or folder.|\n|Microsoft OneDrive drive management AI agent|Retrieves the metadata of a specific drive in Microsoft OneDrive.|\n|Microsoft OneDrive file management AI agent|Manages files, file versions, and attachments in Microsoft OneDrive. Also, retrieves details of the required file.|\n|Microsoft OneDrive folder management AI agent|Manages folders in Microsoft OneDrive.|\n|Microsoft OneDrive permission management AI agent|Creates sharing link for a drive item and manages permissions.|\n\nThere might be AI agents installed on your instance that are not used in agentic workflows. To learn how to see all agents that are available to you, see [Find AI agents](https://raw.githubusercontent.com/ServiceNow/ServiceNowDocs/australia/markdown/intelligent-experiences/find-ai-agents.md).\n\n**Note:** Ensure that the user running an AI agent has the required roles and permissions to access data or perform operations on data in the table that is associated with the AI agent.\n\n## Spoke module\n\nBi-directional webhooks can be set up to get notifications about the required events. Routing policy defines conditions that must be met to notify the ServiceNow app. These conditions are based on the events in OneDrive that you want to be notified about. When the conditions are met, a routing policy triggers the associated subflow, which in turn automates the OneDrive tasks.\n\nThe bi-directional webhooks require separate setup and can be used independently without using the spoke actions. By default, the OneDrive Webhooks application is available in the OneDrive spoke and has the following modules:\n\n|Module|Description|\n|------|-----------|\n|OneDrive SyncToken|Enables you to view SyncTokens of OneDrive.|\n|OneDrive Webhook Registries|Enables you to create and view the OneDrive webhooks in ServiceNow.|\n|OneDrive Webhook Routing Policy|Enables you to create and view the routing policies for the OneDrive webhooks in ServiceNow. You can also customize the conditions in the routing policies as per your requirement.|\n\n## OneDrive Online account requirements\n\nThe Microsoft OneDrive spoke requires a custom app that you create in Microsoft Azure.\n\n## Connection and credential alias requirements\n\nIntegration Hub uses aliases to manage connection and credential information, and OAuth credentials. Using an alias eliminates the need to configure multiple credentials and connection information profiles when using multiple environments. If the connection or credential information changes, you don't need to update any actions that use the connection.\n\n-   **Single tenant**\n\n    The OneDrive spoke includes the OneDrive alias record to authorize actions on Microsoft OneDrive. Select this alias in the Tenant record to authorize changes in Microsoft OneDrive for a single tenant.\n\n\nFor information about setting up the spoke, see [Set up Microsoft OneDrive spoke](https://raw.githubusercontent.com/ServiceNow/ServiceNowDocs/australia/markdown/australia/integrate-applications/integration-hub/setup-msonedrive.md).\n\n## MID Server requirements\n\nThese actions use REST calls that can run either on an instance or, optionally, through a MID Server. Use the connection record associated with the Microsoft OneDrive alias to configure where actions run and, if needed, specify MID Server selection attributes. For more information, see [MID server](https://raw.githubusercontent.com/ServiceNow/ServiceNowDocs/australia/markdown/servicenow-platform/mid-server-landing.md).\n\nTo set up the MID Server for this spoke, see [Set up MID Server for a spoke](https://raw.githubusercontent.com/ServiceNow/ServiceNowDocs/australia/markdown/australia/integrate-applications/integration-hub/config-adv-mid-settings-for-oauth-on-mid.md).\n\n"}}