microsoft / Microsoft365DSC

Manages, configures, extracts and monitors Microsoft 365 tenant configurations
https://aka.ms/M365DSC
MIT License
1.64k stars 505 forks source link

Authentication through application secret fails after upgrade to version 1.23.1206.1 #4063

Open JordyHerber opened 11 months ago

JordyHerber commented 11 months ago

Description of the issue

Hi! See issue Authentication through application secret fails after upgrade to version 1.23.1206.1 #4013 . This is still not working.

Microsoft 365 DSC Version

1.23.1213.1

Which workloads are affected

Azure Active Directory, Exchange Online, Office 365 Admin, OneDrive for Business, Planner, Power Platform, Security & Compliance Center, SharePoint Online, Teams, other

The DSC configuration

No response

Verbose logs showing the problem

Hi Guys,

Same issue here. already updated module and dependencies. No other module version is present. When I try:

PS C:\Users\rubiadmin> Connect-M365Tenant -Workload MicrosoftGraph -ApplicationId $appIDCustomer -ApplicationSecret $appSecretCustomer -TenantId $tenantNameCustomer

PS C:\Users\rubiadmin> Get-MgBetaDeviceManagement
Get-MgBetaDeviceManagement : Could not load file or assembly 'Microsoft.Graph.Authentication, Version=2.10.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35'
or one of its dependencies. The system cannot find the file specified.
At line:1 char:1

    Get-MgBetaDeviceManagement

      + CategoryInfo          : NotSpecified: (:) [Get-MgBetaDeviceManagement_Get], FileNotFoundException
      + FullyQualifiedErrorId : Microsoft.Graph.Beta.PowerShell.Cmdlets.GetMgBetaDeviceManagement_Get

Any ideas?

Environment Information + PowerShell Version

No response

JordyHerber commented 11 months ago

When seeing the Enterprise App (linked to the app registration) the logons to the MSGraph are succesfull in the logging

JordyHerber commented 11 months ago

@ricmestre I've tried adding your fix and replacing your code with the current in the graph file within the module. But it is not working and failing on row 168. uri is not valid. Any suggestions?

ricmestre commented 11 months ago

Unfortunately you'll have to debug it because if it reaches that point in the code and Uri is not valid it means it's failing way before reaching anything that my patch solves.

andikrueger commented 10 months ago

Could you please run Update-M365DSCDependencies and Remove-M365DSCOutdatedDependencies. It looks like not all graph modules are of the same version.