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

Extracting O365SearchAndIntelligenceConfigurations or TeamsOrgWideAppSettings the script says No Authentication method was provided #4409

Closed
g9sbf026dg opened this issue Mar 5, 2024 · 4 comments

Comments

@g9sbf026dg
Copy link

Description of the issue

Export-M365DSCConfiguration runs using a service principal with certificate thmbprint.

Out of all available components the script has an issue with 2.
O365SearchAndIntelligenceConfigurations and TeamsOrgWideAppSettings

This is how the command is formatted. Currently I’m working with just the two problematic components. The same command runs fine against all other components of all workloads if we populate the full list of components between the brackets in the command.
Export-M365DSCConfiguration -Path 'D:\Scripts*\M365DSC' -FileName 'Config-test.ps1' -ApplicationId "" -CertificateThumbprint "*" -TenantId ".onmicrosoft.com" -Components @("O365SearchAndIntelligenceConfigurations", "TeamsOrgWideAppSettings") -verbose

Working on the script as formatted to authenticate with an app certificate. For troubleshooting we also tried app secret with the same result. Not able to try a GA credential because environment security constraints.

As we see from the verbose output of the error, it’s not passing over the authentication method and credentials.

Microsoft 365 DSC Version

1.24.228.1

Which workloads are affected

Office 365 Admin, Teams

The DSC configuration

Export-M365DSCConfiguration -Path 'D:\Scripts\*\M365DSC' -FileName 'Config-test.ps1' -ApplicationId "***" -CertificateThumbprint "***" -TenantId "*.onmicrosoft.com" -Components @("O365SearchAndIntelligenceConfigurations", "TeamsOrgWideAppSettings") -verbose

Verbose logs showing the problem

VERBOSE: ApplicationId, TenantId, CertificateThumbprint were specified. Connecting via Service Principal
Connecting to {ExchangeOnline}...✅
Connecting to {MicrosoftTeams}...✅
[1/2] Extracting [O365SearchAndIntelligenceConfigurations] using {}...VERBOSE: Attempting connection to {MicrosoftGraph} with:
VERBOSE: 
VERBOSE: Dependencies were already successfully validated.
VERBOSE: No Authentication method was provided
Partial Export file was saved at: C:\Users\M3DSD00A\AppData\Local\Temp\6\9a319ba6-1e88-4e29-9ee4-a3ec8c5eaa94.partial.ps1
You must specify either the Credential or ApplicationId, TenantId and CertificateThumbprint parameters.
At C:\Program Files\WindowsPowerShell\Modules\Microsoft365DSC\1.24.228.1\Modules\M365DSCUtil.psm1:1784 char:9
+         throw $errorText
+         ~~~~~~~~~~~~~~~~
    + CategoryInfo          : OperationStopped: (You must specif...int parameters.:String) [], RuntimeException
    + FullyQualifiedErrorId : You must specify either the Credential or ApplicationId, TenantId and CertificateThumbprint parameters.

Environment Information + PowerShell Version

OsName               : Microsoft Windows Server 2019 Standard
OsOperatingSystemSKU : StandardServerEdition
OsArchitecture       : 64-bit
WindowsVersion       : 1809
WindowsBuildLabEx    : 17763.1.amd64fre.rs5_release.180914-1434
OsLanguage           : en-US
OsMuiLanguages       : {en-US}

Key   : PSVersion
Value : 5.1.17763.5458
Name  : PSVersion

Key   : PSEdition
Value : Desktop
Name  : PSEdition

Key   : PSCompatibleVersions
Value : {1.0, 2.0, 3.0, 4.0...}
Name  : PSCompatibleVersions

Key   : BuildVersion
Value : 10.0.17763.5458
Name  : BuildVersion

Key   : CLRVersion
Value : 4.0.30319.42000
Name  : CLRVersion

Key   : WSManStackVersion
Value : 3.0
Name  : WSManStackVersion

Key   : PSRemotingProtocolVersion
Value : 2.3
Name  : PSRemotingProtocolVersion

Key   : SerializationVersion
Value : 1.1.0.1
Name  : SerializationVersion
@andikrueger
Copy link
Collaborator

Afaik this is known issue with these resources. See : #3382 and #3394

@CiscoZarama
Copy link

Is this being worked on? It appears both components do not support Application API permissions. I can confirm this issue persists with the latest release.

@FabienTschanz
Copy link
Collaborator

The only way I got that working is with Credentials. Most likely it is because the underlying API does not support app permissions.

@ricmestre
Copy link
Contributor

@FabienTschanz Regarding TeamsOrgWideAppSettings I replied on #3394, regarding O365SearchAndIntelligenceConfigurations I already raised issue #5680 asking about this with some more information.

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

No branches or pull requests

5 participants