# Workflow: OneDrive compliance

## Overview <a href="#workflow-onedrivecompliance-overview" id="workflow-onedrivecompliance-overview"></a>

OneDrive is critical to remain productive. However, synchronization issues are common, leading to many frustrations, productivity issues, and, ultimately, L1 tickets. Although in most cases, the fix is simple, it still requires a ticket and calls to the desk, taking up more of IT support's time.

Trigger an automated workflow across any group of devices to verify and ensure OneDrive is present and properly synchronized. If any issues are detected, the workflow automatically performs the necessary remediation.

This workflow automatically enables you to resolve and filter out common OneDrive issues. This saves significant time for any support team, enabling them to investigate and focus on more serious problems.

## Changelog <a href="#workflow-onedrivecompliance-changelog" id="workflow-onedrivecompliance-changelog"></a>

V1.0.0.0 - Initial Release

### Dependencies <a href="#workflow-onedrivecompliance-dependencies" id="workflow-onedrivecompliance-dependencies"></a>

In order to use this flow the following content needs to be installed into your Nexthink Infinity tenant using the Nexthink Library.

### Remote actions <a href="#workflow-onedrivecompliance-remoteactions" id="workflow-onedrivecompliance-remoteactions"></a>

* Get OneDrive status
* Repair OneDrive
* Get OneDrive sync status
* Reset OneDrive

For more details about remote actions in workflows see [https://nexthink.gitbook.io/opd/user-guide/workflows/creating-workflows/designer](https://nexthink.gitbook.io/opd/user-guide/workflows/creating-workflows/designer).

### Campaigns <a href="#workflow-onedrivecompliance-campaigns" id="workflow-onedrivecompliance-campaigns"></a>

* Reset OneDrive agent - Invoke
* Reset OneDrive agent - Complete (macOS only)

For more details about campaigns see [https://nexthink.gitbook.io/opd/user-guide/campaigns](https://nexthink.gitbook.io/opd/user-guide/campaigns) and campaigns in workflows see[ ](https://nexthink.gitbook.io/opd/user-guide/workflows/creating-workflows/designer)[https://nexthink.gitbook.io/opd/user-guide/workflows/creating-workflows/designer](https://nexthink.gitbook.io/opd/user-guide/workflows/creating-workflows/designer).

## Configuration <a href="#workflow-onedrivecompliance-configuration" id="workflow-onedrivecompliance-configuration"></a>

### Remote action and campaign configuration <a href="#workflow-onedrivecompliance-remoteactionandcampaignconfiguration" id="workflow-onedrivecompliance-remoteactionandcampaignconfiguration"></a>

{% hint style="info" %}
**Please note:** To be used in a workflow, the following remote actions must be configured with a manual trigger. It can be combined with other execution triggers if the remote action is also used outside of a workflow.
{% endhint %}

The following remote actions require campaigns.

* Reset OneDrive
  * \[campaign\_id]: Reset OneDrive agent - Invoke
  * \[campaign\_completed\_id]: Reset OneDrive agent - Complete (macOS only)

### Service/API configuration <a href="#workflow-onedrivecompliance-service-apiconfiguration" id="workflow-onedrivecompliance-service-apiconfiguration"></a>

Connector credentials are required for the service/API call step - "Report this device via ITSM ticket".\
Connector credentials must be manually configured based on your ITSM solution and its current configuration. For more information about setting up connector credentials in Nexthink, you can refer to [this documentation page](https://nexthink.gitbook.io/opd/integrations/outbound-connectors/connector-credentials).

### Trigger configuration for the workflow <a href="#workflow-onedrivecompliance-triggerconfigurationfortheworkflow" id="workflow-onedrivecompliance-triggerconfigurationfortheworkflow"></a>

This workflow has been designed primarily to run automatically using the schedule trigger however it can be useful to also enable the manual trigger to allow on-the-fly client remediations to be sent.

When configuring the scheduler we recommend the following settings as a baseline:

### **NQL:**

{% code title="Code" lineNumbers="true" %}
```
devices during past 7d
| where operating_system.platform == Windows
 and operating_system.name !in ["*server*"]
```
{% endcode %}

**Recurrence:** Weekly - select at least one day.

{% hint style="info" %}
**Please note:** Once all the prerequisites and workflow are installed and configured, you can use the built-in validation feature that runs every time you save the workflow.
{% endhint %}

## Workflow Structure <a href="#workflow-onedrivecompliance-workflowstructure" id="workflow-onedrivecompliance-workflowstructure"></a>

{% hint style="info" %}
**Please note:** The workflow uses campaigns that alert users before every step that affects their Microsoft OneDrive client software. Users can cancel a workflow if it's not the right time to work with their Microsoft OneDrive client.
{% endhint %}

This section describes the key steps in this workflow:

* At the start of this workflow, there is a "Get OneDrive client status" thinklet configured to automate the retrieval of Microsoft OneDrive client status information using a remote action;
* Based on the results of this analysis, the workflow determines whether the following issues need to be resolved with additional remote actions:
  * Does the device have the Microsoft OneDrive client installed?
  * Does the Microsoft OneDrive client report sync issues?

<div data-full-width="true"><figure><img src="https://268444917-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FxJSUDk9NTtCHYPG5EWs3%2Fuploads%2Fgit-blob-ef085625338088ffa2b2e8d50c9aa31a990f51c0%2Fimage-20230918-153101.png?alt=media" alt=""><figcaption></figcaption></figure></div>

* Once these issues are identified, the workflow resets the OneDrive client and waits for the reset to complete.

<div data-full-width="false"><figure><img src="https://268444917-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FxJSUDk9NTtCHYPG5EWs3%2Fuploads%2Fgit-blob-91fb73ab77de17a56a4b6b76de704e4800387e66%2Fimage-20230918-153417.png?alt=media" alt=""><figcaption></figcaption></figure></div>

* The workflow then checks the OneDrive client status again and generates an ITSM ticket if the problem persists.

<div data-full-width="true"><figure><img src="https://268444917-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FxJSUDk9NTtCHYPG5EWs3%2Fuploads%2Fgit-blob-7c646b399697ce865f0f4b217ebf121b5a02a8cd%2Fimage-20230918-153541.png?alt=media" alt=""><figcaption></figcaption></figure></div>

***

RELATED TOPICS

* [Manage Workflows](https://nexthink.gitbook.io/opd/user-guide/workflows/managing-workflows)
* [Manage Remote Actions](https://nexthink.gitbook.io/opd/user-guide/remote-actions/managing-remote-actions)
* [Manage Campaigns](https://nexthink.gitbook.io/opd/user-guide/campaigns/managing-campaigns)
