Open ResearchAndDevelopment00 opened 5 months ago
Please check your EntraID for a M365Group without a DisplayName. This is most likely the reason for this issue.
I am able to export the TeamsTeam
component with Global Administration
privileges, so I don't think that the absence of a DisplayName would be an issue.
Also, how can I change the location for the M365DSC-ErrorLog.log files?
@andikrueger https://microsoft365dsc.com/user-guide/get-started/authentication-and-permissions/ is missing a section about which role is required for Teams workload (along with the API permissions if using an app) and I also don't know exactly which one is required so I've granted Teams Administrator and this one works, looks like Global Reader doesn't.
This is a bug within the Teams Resource. The display name property is null and causes an issue within the export logic.
AFAIK, Error log location cannot be changed.
@ricmestre did you have a look at this personas article: https://microsoft365dsc.com/concepts/personas/
Saw the diffs when it was added but never actually opened the page, looks neat but it doesn't quite answer the question, so you have a Teams Voice Admin that deals with these policies and Collaboration Admin that deals with those other policies, but then on both it's specified that the required role to create/update is always Teams Administrator. I don't have issues with this info, I figured it out myself but someone else might not get there so easily.
But I'm not going to hijack this thread even more :)
I understood that the Teams Administrator will be able to export the setting but due to the access restriction we can't grant any administrative access so it seems like we need to opt out from exporting the TeamsTeam component for now.
Also, I just wanted to know what would happen if we tried to export the same component twice in a single Export-M365DSCConfiguration command. I tried to do it with the TeamsTeam component and found that it won't create a M365DSC-ErrorLog.log. Not sure if that's a bug or what. I ran the following command with Global Reader privileges:
$password = ConvertTo-SecureString 'xxxxx' -AsPlainText -Force;$credential = New-Object System.Management.Automation.PSCredential ('xxxxx', $password);Import-Module Microsoft365DSC -Force; Export-M365DSCConfiguration -Components @("TeamsTeam","TeamsTeam"}) -Credential $credential -Path .; New-M365DSCReportFromConfiguration -Type JSON -ConfigurationPath ./M365TenantConfig.ps1 -OutputPath ./Report.json
While trying to export configuration using
Export-M365DSCConfiguration
for theTeamsTeam
component withGlobalReader
privileges, I am getting the following error in aM365DSC-ErrorLog.log
file:My question is, how can I change the location for the M365DSC-ErrorLog.log files, and how can I resolve this error for the mentioned role?