Forum Discussion

T0mek's avatar
T0mek
Copper Contributor
Jun 06, 2022
Solved

Finding last owner of an orphaned Team (powershell)

Hi there,

Is there a way to find the last owner of an orphaned team? I would like to be able to find the last known owner (deleted user) of a team and then reassign this team to owner's manager.

 

Thanks for your help!

  • As far as I am concerned, this is currently not possible with PowerShell. you can only pull this type of info via API request but never through PowerShell. you can try your luck with Audit logs but again you can't really go way back and the info may not be available for your as you want it to be. Best way to accomplish this in my opinion is to utilize a third part tool like ShareGate Apricot, the tool will generate a report of orphaned Teams for you and will highlight the last active members and last known owners.
  • AwsAyad's avatar
    AwsAyad
    Brass Contributor
    As far as I am concerned, this is currently not possible with PowerShell. you can only pull this type of info via API request but never through PowerShell. you can try your luck with Audit logs but again you can't really go way back and the info may not be available for your as you want it to be. Best way to accomplish this in my opinion is to utilize a third part tool like ShareGate Apricot, the tool will generate a report of orphaned Teams for you and will highlight the last active members and last known owners.
    • T0mek's avatar
      T0mek
      Copper Contributor
      Thanks, that's what i thought but I wasn't sure. Thank your for a quick reply!
      • AwsAyad's avatar
        AwsAyad
        Brass Contributor
        you welcome. feel free to mark my response as the answer to your question 🙂

Resources