Comments (13)
How could you create Teams without a display name? A display name is required during creation. So, even if we would adjust the DSC resource to allow the export of Teams with a blank display name, we could not use it for importing it again.
from microsoft365dsc.
@malauter I haven't a clue... but somehow it is in my tenant configuration...
from microsoft365dsc.
@malauter Found the problem:
I ran:
`$t = Get-Team
$t | Select GroupId,InternalId,DisplayName,Visibility,MailNickName,Classification,Archived,AllowGiphy,GiphyContentRating,AllowStickersAndMemes,AllowCustomMemes,AllowGuestCreateUpdateChannels,AllowGuestDeleteChannels,AllowCreateUpdateChannels,AllowCreatePrivateChannels,AllowDeleteChannels,AllowAddRemoveApps,AllowCreateUpdateRemoveTabs,AllowCreateUpdateRemoveConnectors,AllowUserEditMessages,AllowUserDeleteMessages,AllowOwnerDeleteMessages,AllowTeamMentions,AllowChannelMentions,ShowInTeamsSearchAndSuggestions |
Export-Csv -NoTypeInformation -delimiter "t" C:\ETL\teams.csv
Upon inspecting the exported file I had 1 entirely blank row. When I went back through the PowerShell output I see this in the output where I have the blank row:
Error retrieving Team with GroupId [abc-1-2-3]. ErrorCode: [NotFound]. ErrorMessage: No team found with Group Id abc-1-2-3
This appears to be a problem with the Get-Team command
from microsoft365dsc.
@skghq If you run this command for problematic team, is $x equal $null afterwards?
$x = Get-Team -GroupID abc-1-2-3
$x -eq $null
from microsoft365dsc.
PS C:\temp\scott\DebugTeam\cwd> $x = Get-Team -GroupID abc-1-2-3
PS C:\temp\scott\DebugTeam\cwd> $x -eq $null
True
from microsoft365dsc.
from microsoft365dsc.
@skghq Thanks! I will adjust the resource to skip such Teams during export.
from microsoft365dsc.
@malauter This topic keeps being brought and it seems there's different opinions on how to solve it. I already had issues in the past with Intune role assignments and this morning with a customer also a problem with a Teams group assignment where the group is essentially deleted and/or orphaned, but the times I've seen reported here these kind of issues the reply was that it should be dealt with MS support instead of changing the code.
Has this opinion changed in the meantime? If yes there are other places where this problem occurs, such as the examples I gave above, and that will need the code changed to cope with this kind of problem.
from microsoft365dsc.
@malauter One more interesting item to note... I consistently get failures for "abc-1-2-3" ... I don't know where it's pulling the GroupId from if it doesn't have a team? I'll look in to it.
What I'm randomly getting when running Get-Team is this:
Error retrieving Team with GroupId [def-9-8-7]. ErrorCode: [BadGateway]. ErrorMessage: Failed to execute backend request.
This might be a throttling issue.
from microsoft365dsc.
@ricmestre It is just my personal opinion, but in this case the Export method cannot even call the Get method, because we have a validation of the display name length (min length = 1) in the Get function. This is why we see this error. To handle this, I would only call the Get method if there is a display name.
This is just my opinion. I will create a PR and then let's see if it will be approved.
from microsoft365dsc.
OK, let's wait and see what's their opinion on this, but see below, the export during TeamsGroupPolicyAssignment is trying to deserialize the DisplayName of $Group[0] but if it's $null, such as a deleted group like I explained one of my customers has, then the export of that resource stops completely. Fortunately in this case it just missed an additional assignment and not dozens or hundreds, in the meantime they raised a ticket with MS support to sort the deletion of that specific assignment since they are not able to do it due to an error being caused by that deleted group.
from microsoft365dsc.
@ricmestre Is there a Github issue for this? I think we should not mix similar issues for different resources here.
from microsoft365dsc.
I'm not mixing, I'm giving an example where the same type of issue happens on another resource. I didn't raise PRs to fix those issues myself for similar cases on other resources because like I said in the past the reply I got was that I had to solve the issue in the tenant instead of changing the code.
from microsoft365dsc.
Related Issues (20)
- IntuneSettingCatalogASRRulesPolicyWindows10: Latest two Attack Surface Reduction rules not supported
- SPO export: Getting multiple The collection has not been initialized errors
- Get-M365DSCCompiledPermissionList with -AccessType Read returns Write permissions HOT 1
- IDX12729: Unable to decode the header '[PII of type 'System.String' is hidden. For more details, see https://aka.ms/IdentityModel/PII.]' as Base64Url encoded string. HOT 2
- SPOTenantSettings issue HOT 1
- IntuneAppConfigurationDevicePolicy: Not working HOT 12
- AADConditionalAccessPolicy: deployment bug since version 1.24.522.1. It's working with 1.24.515.2 HOT 4
- IntuneDeviceRemediation: Assignments are exported without display name HOT 6
- EXOSharedMailbox: Loading of module / connection to ExchangeOnline not proper
- Export-M365DSCConfiguration - System.Management.Automation.RuntimeException: You cannot call a method on a null-valued expression. HOT 3
- Examples of M365 DSC Blueprints HOT 5
- While Exporting Configuration of Planner | It return an empty .ps1 File HOT 2
- Issue when sync conditional access policy HOT 7
- O365OrgSettings: Fix: Boolean Parameters default to false if not specified in configuration
- Composite resources at component level for devops HOT 1
- composite resource structure at component level (instead of workload level), for Devops HOT 2
- SPOTenantSettings: Failing to deploy or test the resource's state with latest Graph version HOT 27
- Partial Export was saved at... HOT 2
- ENHANCEMENT / FEATURE REQUEST - Filter on Property HOT 3
- Clarification on Setting Execution Policy for Microsoft 365 DSC HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from microsoft365dsc.