Git Product home page Git Product logo

plannermigration-graphapi's Introduction

Planner Migration - Graph API

This rather crude script successfully migrated 99.9% of our Plans, Buckets and Tasks from one MS Online tenant to another.

It has some pre-requisites in order to work: You must have all users and groups synced already, we had other native Powershell scripts to do this. You must have a service account user present in every unified group that has a plan, the script will run as this user. You need to register your application in Azure AD and set up ClientID key and Client secrets. You will need a bunch of delegated permissions for this app:

  • Group.Read.All
  • Group.ReadWrite.All
  • Tasks.Read
  • Tasks.Read.Shared
  • Tasks.ReadWrite
  • Tasks.ReadWrite.Shared
  • User.Read
  • User.ReadBasic.All

I set the same permissions in both tenants but you may want it slightly more restricted in the source.

This script works but was hacked together with a time frame in mind, there is most definitely room for improvement. More functions could be implemented and the ones that are there could be made more generic. It is what I like to call "just enough script to get the job done". We only needed to run this script once so I approached the point of diminishing returns rapidly. Although it should run fine to do an incremental after the initial run so I will probably run it again. Submissions for improvements would definitely be welcome.

The one and only time I ran it there were a couple of errors thrown up in the buckets and tasks sections that I think were to do with malformed JSON payloads. If I can figure out which ones failed then I will attempt to diagnose more and get into it.

I did also observe a condition whereby a plan could have more than one ID which threw earlier versions of the script off. I have corrected for this now and I suspect that the bucket and tasks issues described above were also down to this.

As always it should be run entirely at your own risk, I would definitely recommend a thorough audit before letting it loose against you production environment.

This script builds upon the immensely helpful stuff I gleaned from here: https://www.thelazyadministrator.com/2019/07/22/connect-and-navigate-the-microsoft-graph-api-with-powershell/

plannermigration-graphapi's People

Contributors

smbm avatar

Stargazers

 avatar Jon Cruchley avatar Leo avatar Pìnei avatar Shahin Pirooz avatar Peter Mustow avatar Jacob Palm avatar Thomas Heinz avatar Przemysław Kłys avatar Ryan Fisher avatar

Watchers

James Cloos avatar  avatar Ryan Fisher avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.