Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

TeamsTeam: Keep order of objects between exports #5829

Open
jaebischer opened this issue Feb 21, 2025 · 0 comments
Open

TeamsTeam: Keep order of objects between exports #5829

jaebischer opened this issue Feb 21, 2025 · 0 comments

Comments

@jaebischer
Copy link

Description of the issue

We are using Export-M365DSCConfiguration to dump the configuration in git and track changes between exports. Because the order of the Teams objects are changing in every export git will report file changes.

The reason for this behavior is because Get-Teams seems to return the objects in random order.

$first = Get-Team
$second = Get-Team
# Will return differences
Compare-Object $first.GroupId $second.GroupId -SyncWindow 0

$first = Get-Team | Sort-Object GroupId
$second = Get-Team | Sort-Object GroupId
# Will not return any differences
Compare-Object $first.GroupId $second.GroupId -SyncWindow 0

It would be great if the Teams resources would keep the order (for example by sorting by GroupId). The following resources are affected:

  • TeamsTeam
  • TeamsChannel
  • TeamsUser
  • TeamsChannelTab

For all other resources we backup the order seems to be OK between exports.

If you agree, I could create a pull request to change the behavior for these resources

Microsoft 365 DSC Version

DEV / V1.25.219.2

Which workloads are affected

Teams

The DSC configuration

Verbose logs showing the problem

Environment Information + PowerShell Version

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant