{"revision":"c10276e953456835cdbb1f3a60d58ae1980be353","document":{"id":47299,"path":"servicenow-platform/document-management-services/onedrive-spoke-document-services-framework.md","title":"Document Services Framework for Microsoft OneDrive","bundle":null,"doc_type":null,"release":"australia","body":"\n# Document Services Framework for Microsoft OneDrive\n\nIntegrate the Document Services Framework with Microsoft OneDrive.\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 for Document Services Framework spoke v 1.2.2 is the latest version.\n\n## Supported versions\n\nThis spoke was built for Microsoft OneDrive Spoke for Document Services Framework V1.1, but might be compatible with later versions.\n\n## Key features\n\nMicrosoft OneDrive Spoke for Document Services Framework enables a flow designer to do the following:\n\n-   Upload documents to Microsoft OneDrive\n-   Collaborate\n-   Manage versions\n-   Download documents\n\n## Spoke dependencies\n\nIf you’re having trouble installing the app, ensure that these dependent plugins are installed:\n\n-   Complex Object \\(com.glide.cobject\\)\n-   IHUB Spoke Util Pack \\(com.snc.ihub\\_spoke\\_util\\_pack\\)\n-   Multi Provider Document Services Framework \\(com.snc.multiprovider\\_documents\\)\n-   Remote Directory Sync \\(com.snc.remote\\_directory\\_sync\\)\n-   ServiceNow Flow Designer - Dynamic Inputs \\(com.glide.hub.dynamic\\_inputs\\)\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 appropriate licenses if used outside the spoke implementation.\n\n## Spoke subflows\n\nThe Microsoft OneDrive Spoke for Document Services Framework provides sample subflows to demonstrate the automation of Document Services tasks. To customize a sample subflow, copy it to a new application scope. The following tables list the available sample subflows for V1 and V2.\n\n**Note:** Only V2 subflows support the Microsoft SharePoint site.\n\n<table id=\"table_tld_tby_wtb\"><thead><tr><th>\n\nSubflow\n\n</th><th>\n\nDescription\n\n</th></tr></thead><tbody><tr><td>\n\nAdd Collaborator To Group\n\n</td><td>\n\nAdds the supplied CollaboratorID as the Member or Owner specified by Type.\n\n</td></tr><tr><td>\n\nCollaborate Document\n\n</td><td>\n\nAssociates a document with a group or a user on Microsoft OneDrive.\n\n</td></tr><tr><td>\n\nCollaborate Document With Recipient Type\n\n</td><td>\n\nAssociates a document with a specified Recipient Type\n\n</td></tr><tr><td>\n\nConnect Document From OneDrive Using Path\n\n</td><td>\n\nConnects the Microsoft OneDrive document.\n\n</td></tr><tr><td>\n\nCopy OneDrive Document Version\n\n</td><td>\n\nCopies the document with the specified version from Microsoft OneDrive to an attachment in the ServiceNow instance.\n\n</td></tr><tr><td>\n\nCreate Document\n\n</td><td>\n\nCopies the document to Microsoft OneDrive, creates a record in the Multi Provider Document \\[mp\\_document\\] table, and adds a version in the Multi Provider Document Version \\[mp\\_document\\_version\\] table.\n\n</td></tr><tr><td>\n\nCreate Group\n\n</td><td>\n\nCreates a group as specified in Microsoft OneDrive and updates the Multi Provider Permission Configuration \\[mp\\_permission\\_configuration\\] table.\n\n</td></tr><tr><td>\n\nDelete Document\n\n</td><td>\n\nDeletes the document in Microsoft OneDrive and removes its corresponding records in the Multi Provider Document Version \\[mp\\_document\\_version\\] tables.\n\n</td></tr><tr><td>\n\nDelete Document Version\n\n</td><td>\n\nDeletes the specified version of the document in Microsoft OneDrive and the ServiceNow instance and deletes a record in the Multi Provider Document Version \\[mp\\_document\\_version\\] table.\n\n</td></tr><tr><td>\n\nGet All Document Version\n\n</td><td>\n\nRetrieves all document versions from Microsoft OneDrive and creates and updates records in the Multi Provider Document Version \\[mp\\_document\\_version\\] table.\n\n</td></tr><tr><td>\n\nGet Document from OneDrive\n\n</td><td>\n\nCopies the document from Microsoft OneDrive to the specified document name. It also creates a record in the Multi Provider Document \\[mp\\_document\\] table and in all document versions in the Multi Provider Document Version \\[mp\\_document\\_version\\] table.\n\n</td></tr><tr><td>\n\nRestore Document Version\n\n</td><td>\n\nRestore the document to the version in Microsoft OneDrive.\n\n</td></tr><tr><td id=\"sync-collab-onedrive\">\n\nSync Collaborators\n\n</td><td>\n\nSyncs all Microsoft Azure users into the Multi Provider Collaborators \\[mp\\_collaborators\\] table.If the user is deleted or updated, the user's record in the Multi Provider Collaborators \\[mp\\_collaborators\\] table is checked, if it’s present then the record is deleted or updated.\n\nIf the user is newly added, then it creates an entry in the Multi Provider Collaborators \\[mp\\_collaborators\\] table under Multi Provider Documents.\n\n**Note:** The scheduled job with the name **Sync Collaborators** triggers the subflow for Sync Collaborators. You can choose from the available run a script option. The default option is **On Demand**. The job is run based on the set schedule and collaborators are synchronized accordingly. For more information, see [Automatically run a script of your choosing](https://raw.githubusercontent.com/ServiceNow/ServiceNowDocs/australia/markdown/platform-administration/t_ScheduleAScriptExecution.md).\n\n</td></tr><tr><td>\n\nDelete Collaborator Record\n\n</td><td>\n\nDeletes the specified collaborator record from the Multi Provider Collaborators \\[mp\\_collaborators\\] table.\n\n</td></tr><tr><td>\n\nUpdate Document Content\n\n</td><td>\n\nUpdates the specified document with the provided attachment in Microsoft OneDrive that corresponds to the document ID. The attachment name should match the name of the document in Microsoft OneDrive.\n\n</td></tr><tr><td>\n\nUpload Large File\n\n</td><td>\n\nUploads an attachment to Microsoft OneDrive. The maximum size of the file can’t exceed 60 MB.\n\n</td></tr><tr><td>\n\nGet Latest URL\n\n</td><td>\n\nGets the latest URL to a document in the Microsoft OneDrive.\n\n</td></tr><tr><td>\n\nReconnect Document from Microsoft OneDrive\n\n</td><td>\n\nReconnects to a document in Microsoft OneDrive. **Note:** Before using the subflow, ensure that the corresponding Microsoft OneDrive connection and credential are created and the Microsoft OneDrive authorization token is available.\n\n</td></tr></tbody>\n</table><table id=\"table_qxf_dbr_zzb\"><thead><tr><th>\n\nSubflow\n\n</th><th>\n\nDescription\n\n</th></tr></thead><tbody><tr><td>\n\nGet Document Latest URL V2\n\n</td><td>\n\nGets the latest URL from Microsoft OneDrive for the referred document ID.\n\n</td></tr><tr><td>\n\nUpdate Document Content V2\n\n</td><td>\n\nUpdates the specified document with the provided attachment content in Microsoft OneDrive corresponding to the document ID from table Multi Provider Document sys\\_id. The attachment name should match with the name of the document in Microsoft OneDrive.\n\n</td></tr><tr><td>\n\nCollaborate Document V2\n\n</td><td>\n\nAssociates a document with a specified recipient type.\n\n</td></tr><tr><td>\n\nConnect Document From OneDrive Using Path V2\n\n</td><td>\n\nConnects the Microsoft OneDrive document that can also be tracked under Multi Provider Documents.\n\n</td></tr><tr><td>\n\nCopy OneDrive Document Version V2\n\n</td><td>\n\nCopies the document with the specified version from Microsoft OneDrive to an attachment in the ServiceNow instance.\n\n</td></tr><tr><td>\n\nCreate Document V2\n\n</td><td>\n\nCopies the document to Microsoft OneDrive and creates a record in the Multi Provider Document \\[mp\\_document\\] table and the Multi Provider Document Version \\[mp\\_document\\_version\\] table for Multi Provider Documents.\n\n</td></tr><tr><td>\n\nDelete Document V2\n\n</td><td>\n\nDeletes the document in Microsoft OneDrive and removes its corresponding records in the Multi Provider Document \\[mp\\_document\\] table and the Multi Provider Document Version \\[mp\\_document\\_version\\] tables.\n\n</td></tr><tr><td>\n\nDelete Document Version V2\n\n</td><td>\n\nDeletes the particular version of the document in bothMicrosoft OneDrive and deletes a record in the Multi Provider Document Version \\[mp\\_document\\_version\\] table under Multi Provider Documents.\n\n</td></tr><tr><td>\n\nGet All Document Versions V2\n\n</td><td>\n\nRetrieves all the document versions from Microsoft OneDrive and creates or updates records in the Multi Provider Document Version \\[mp\\_document\\_version\\] table under Multi Provider Documents. This subflow supports documents from different sources supported by Microsoft OneDrive.\n\n</td></tr><tr><td>\n\nGet Document from OneDrive V2\n\n</td><td>\n\nCopies the document from Microsoft OneDrive to the specified document name. It also creates a record in the Multi Provider Document \\[mp\\_document\\] table and all its versions in the Multi Provider Document Version \\[mp\\_document\\_version\\] table under Multi Provider Documents.\n\n</td></tr><tr><td>\n\nReconnect Document from Microsoft OneDrive V2\n\n</td><td>\n\nReconnects to a document in the Microsoft OneDrive.**Note:** Before using the subflow, ensure that the corresponding Microsoft OneDrive connection and credential are created and the Microsoft OneDrive authorization token is available.\n\n</td></tr><tr><td>\n\nRestore Document Version V2\n\n</td><td>\n\nRestores the document to the version provided in the Microsoft OneDrive.\n\n</td></tr><tr><td>\n\nSync Collaborators V2\n\n</td><td>\n\nSyncs all Microsoft Azure users into the Collaborators \\[mp\\_collaborators\\] table under Multi Provider Documents.\n\n</td></tr><tr><td>\n\nUpload Large File V2\n\n</td><td>\n\nUploads an attachment to Microsoft OneDrive. The maximum size of the file can't exceed 60 MB.\n\n</td></tr><tr><td>\n\nRemove Document Collaboration\n\n</td><td>\n\nRemoves collaboration on a Microsoft OneDrive document.\n\n</td></tr><tr><td>\n\nUpdate Document Collaboration\n\n</td><td>\n\nUpdates collaboration on a Microsoft OneDrive document.\n\n</td></tr></tbody>\n</table>**Note:** The V2 subflows work only for documents attached to the platform using the Create Document V2 or Connect Document V2 subflows.\n\n.\n\n## Spoke Actions\n\nThe Microsoft OneDrive Spoke for Document Services Framework provides sample actions to automate Document Services tasks when events occur in ServiceNow. The following table lists the available sample actions.\n\n<table id=\"table_ddl_cq2_ytb\"><thead><tr><th>\n\nAction\n\n</th><th>\n\nDescription\n\n</th></tr></thead><tbody><tr><td>\n\nDelete Collaborator Record\n\n</td><td>\n\nDeletes the specified collaborator record from the Multi Provider Collaborators \\[mp\\_collaborators\\] table.\n\n</td></tr><tr><td>\n\nDelete document\n\n</td><td>\n\nDeletes the document record from the Multi Provider Document \\[mp\\_document\\] table.\n\n</td></tr><tr><td>\n\nDelete document and versions\n\n</td><td>\n\nDeletes the specified document and all of its versions from the Multi Provider Document Version \\[mp\\_document\\_version\\] table.\n\n</td></tr><tr><td>\n\nDelete document version\n\n</td><td>\n\nDeletes specified versions of a document from the Multi Provider Document Version \\[mp\\_document\\_version\\] table.\n\n</td></tr><tr><td>\n\nDelete versions of document\n\n</td><td>\n\nDeletes all versions of a specified document.\n\n</td></tr><tr><td>\n\nLook up Target Record Existence\n\n</td><td>\n\nChecks for the existence of a target record in the specified target table.\n\n</td></tr><tr><td>\n\nLook Up Incremental Files and Folders\n\n</td><td>\n\n-   Retrieves the list of files and folders under the given Folder ID for the selected Source and Source ID. If no source is selected, then it lists the contents of the root folder by default.\n-   Retrieves the list of files and folders based on the given search query. Hierarchical search is also supported, allowing navigation through folder structures.\n\n**Note:** Search results may vary due to Microsoft OneDrive 's indexing behavior.\n\n\n</td></tr><tr><td>\n\nLook up Sites Based On Query String Stream\n\n</td><td>\n\nLists all the sites satisfying the specified query string.\n\n</td></tr><tr><td>\n\nUpdate Delta Token\n\n</td><td>\n\nUpdates the system property **deltaToken** with the specified delta token.\n\n</td></tr></tbody>\n</table>## Connection and credential alias requirements\n\nIntegration Hub uses aliases to manage connection and credential information. 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. For more information, see [Connections and Credentials](https://raw.githubusercontent.com/ServiceNow/ServiceNowDocs/australia/markdown/platform-security/r-credentials.md).\n\nFor information about setting up the spoke, see [Set up Microsoft OneDrive spoke](https://raw.githubusercontent.com/ServiceNow/ServiceNowDocs/australia/markdown/integrate-applications/setup-msonedrive.md).\n\n**Parent Topic:**[Microsoft OneDrive integration with Document Services](https://raw.githubusercontent.com/ServiceNow/ServiceNowDocs/australia/markdown/australia/servicenow-platform/document-management-services/one-drive-integration.md)\n\n"}}