Get planner information using powershell with tenant farm or global account

%3CLINGO-SUB%20id%3D%22lingo-sub-1279879%22%20slang%3D%22en-US%22%3EGet%20planner%20information%20using%20powershell%20with%20tenant%20farm%20or%20global%20account%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1279879%22%20slang%3D%22en-US%22%3E%3CP%3EDear%20All%2C%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EWe%20have%20a%20requirement%20that%20need%20to%20pull%20all%20planner%20details%20including%20created%20and%20owners%20information.%20We%20able%20get%20the%20same%20%26nbsp%3Binformation%20by%20using%20below%20Powershell%20(MS%20graph%20PowerShell%20module)%20script%20but%20the%20big%20drawback%20of%20the%20script%20is%20%2C%20user%2Faccount%20who%20executing%20the%20script%20should%20be%20part%20of%20the%20every%20group%20in%20order%20to%20pull%20all%20group%20planner%20information%20but%20we%20cannot%20add%20any%20user%2Faccount%20in%20all%20groups%20(more%20than%201000%20groups)%20in%20our%20prod%20tenant%20to%20do%20the%20same.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3ECould%20you%20please%20suggest%20how%20can%20we%20pull%20planner%20information%20using%20farm%2Fglobal%20account%20or%20any%20work%20around%20for%20the%20same%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EAppreciate%20any%20reply%20in%20advance.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%24groupid%20%3D%20%24gids.'GroupID'%3C%2FP%3E%3CP%3E%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%20Write-Host%20%24groupid%20-ForegroundColor%20Green%3C%2FP%3E%3CP%3E%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%20%23Start-Sleep%20-Seconds%205%3C%2FP%3E%3CP%3E%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%20%24Gplannner%20%3D%20Get-GroupPlannerPlan%20-GroupId%20%24groupid%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%20foreach(%20%24gp%20in%20%24Gplannner%20)%3C%2FP%3E%3CP%3E%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%20%7B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%20Write-Host%20%24gp.Id%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%20%24gprow%20%3D%26nbsp%3B%26nbsp%3B%20%5Bpscustomobject%5D%40%7B%3C%2FP%3E%3CP%3E%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%20Id%20%3D%20%24gp.Id%3C%2FP%3E%3CP%3E%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%20Title%20%3D%20%24gp.Title%3C%2FP%3E%3CP%3E%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%20Owner%20%3D%20%24gp.Owner%3C%2FP%3E%3CP%3E%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%20CreatedDateTime%20%3D%20%24gp.CreatedDateTime%3C%2FP%3E%3CP%3E%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%20%23MembersSMTP%20%3D%20%24MembersSMTP%20-join%20%22%60n%22%3C%2FP%3E%3CP%3E%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%20%23OwnersSMTP%20%3D%20%24OwnersSMTP%20-join%20%22%60n%22%3C%2FP%3E%3CP%3E%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%20%23MembersSMTP%20%3D%20%24objMem%3C%2FP%3E%3CP%3E%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%20Members%20%3D%20%22%22%3C%2FP%3E%3CP%3E%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%20%7D%3C%2FP%3E%3CP%3E%26nbsp%3B%26nbsp%3B%26nbsp%3B%20%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%24GroupsCSV%2B%3D%24gprow%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%20%7D%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1280761%22%20slang%3D%22en-US%22%3ERe%3A%20Get%20planner%20information%20using%20powershell%20with%20tenant%20farm%20or%20global%20account%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1280761%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F608592%22%20target%3D%22_blank%22%3E%40Chandu_Bheemuni%3C%2FA%3E%26nbsp%3BIt%20is%20not%20possible%20to%20pull%20the%20planner%20reports%20without%20adding%20the%20service%20account%20as%20a%20member%20of%20all%20Office365%20groups.%20We%20have%20tried%20different%20ways%20and%20nothing%20helped.%26nbsp%3B%3C%2FP%3E%3C%2FLINGO-BODY%3E
Highlighted
Occasional Visitor

Dear All,

 

We have a requirement that need to pull all planner details including created and owners information. We able get the same  information by using below Powershell (MS graph PowerShell module) script but the big drawback of the script is , user/account who executing the script should be part of the every group in order to pull all group planner information but we cannot add any user/account in all groups (more than 1000 groups) in our prod tenant to do the same.

 

Could you please suggest how can we pull planner information using farm/global account or any work around for the same

 

Appreciate any reply in advance.

 

$groupid = $gids.'GroupID'

      Write-Host $groupid -ForegroundColor Green

      #Start-Sleep -Seconds 5

       $Gplannner = Get-GroupPlannerPlan -GroupId $groupid

 

       foreach( $gp in $Gplannner )

       {

 

       Write-Host $gp.Id

 

       $gprow =   [pscustomobject]@{

                    Id = $gp.Id

                    Title = $gp.Title

                    Owner = $gp.Owner

                    CreatedDateTime = $gp.CreatedDateTime

                    #MembersSMTP = $MembersSMTP -join "`n"

                    #OwnersSMTP = $OwnersSMTP -join "`n"

                    #MembersSMTP = $objMem

                    Members = ""

                    }

            $GroupsCSV+=$gprow

 

       }

1 Reply
Highlighted

@Chandu_Bheemuni It is not possible to pull the planner reports without adding the service account as a member of all Office365 groups. We have tried different ways and nothing helped.