# Error exporting PLANNER data using Powershell

**URL:** <https://forums.powershell.org/t/error-exporting-planner-data-using-powershell/12859>\
**Category:** PowerShell Help\
**Created:** [July 12, 2019, 8:52am UTC](https://forums.powershell.org/t/error-exporting-planner-data-using-powershell/12859 "2019-07-12T08:52:51Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![mbehring](https://avatars.discourse-cdn.com/v4/letter/m/65b543/32.png) [@mbehring](https://forums.powershell.org/u/mbehring)\
**Post date:** [July 12, 2019, 8:52am UTC](https://forums.powershell.org/t/error-exporting-planner-data-using-powershell/12859/1 "2019-07-12T08:52:51Z")

</div>

Hi all,

I am trying to export all PLANNER data due to a Tenant migration that is about to happen in the near future. So far I managed to export some users using the following Powershell code:

```
Set-ExecutionPolicy -ExecutionPolicy Unrestricted -Scope Process
Import-module "C:\PlannerUserContentExport\plannertenantadmin.psm1"
Export-PlannerUserContent -UserAadIdOrPrincipalName account-name@domain-name.com -ExportDirectory C:\PlannerExport
```

&nbsp;

This last line repeats itself for all users. However, for some users I am getting the following error:

```
We couldn´t start your export. Error message: The remote server returned an error: (401)
Unauthorized. Support information: CorrelationId 02e15510-6d3e-4280-876b-424046f41335 At C:\PlannerUserContentExport\plannertenantadmin.psm1:164 char:9
+throw $exceptionToThrow
+CategoryInfo: NotSpecified: (:) [], ParentContainsErrorRecordException
+FullyQualifiedErrorId
```

&nbsp;

Any help is aprreciated.

Best regards,

Mario

---

<div class="post-metadata">

**Author:** ![kvprasoon](https://sea1.discourse-cdn.com/flex019/user_avatar/forums.powershell.org/kvprasoon/32/4449_2.png) [@kvprasoon](https://forums.powershell.org/u/kvprasoon)\
**Post date:** [July 13, 2019, 11:31am UTC](https://forums.powershell.org/t/error-exporting-planner-data-using-powershell/12859/2 "2019-07-13T11:31:32Z")

</div>

Are you using [Export user data from Microsoft Planner - Microsoft Planner | Microsoft Docs](https://support.office.com/en-us/article/export-user-data-from-microsoft-planner-91258c96-b353-4da1-b6d9-d78e4809cf08) doc ?

From the error, it seems like a permission issue.

---

<div class="post-metadata">

**Author:** ![dotnVo](https://avatars.discourse-cdn.com/v4/letter/d/4af34b/32.png) [@dotnVo](https://forums.powershell.org/u/dotnVo)\
**Post date:** [May 16, 2024, 8:31pm UTC](https://forums.powershell.org/t/error-exporting-planner-data-using-powershell/12859/3 "2024-05-16T20:31:57Z")

</div>

Closed on May 16, 2024, 8:31pm UTC


