Microsoft365DSC icon indicating copy to clipboard operation
Microsoft365DSC copied to clipboard

Get-MSCloudLoginConnectionProfile : The term 'Get-MSCloudLoginConnectionProfile' is not recognized as the name of a cmdlet, function, script file, or operable program.

Open Aussupport opened this issue 7 months ago • 1 comments

Description of the issue

PS C:\Users> C:\M365\CAExport.ps1 Exporting Microsoft 365 configuration for Components: AADConditionalAccessPolicy

Authentication methods specified:

  • Service Principal with Certificate Thumbprint

[1/1] Extracting [AADConditionalAccessPolicy] using {CertificateThumbprint}...Connecting to {MicrosoftGraph}...❌ Partial Export file was saved at: C:\Users\PPD_IA~2\AppData\Local\Temp\2\462ecc68-4d69-41e9-8339-7c83372bd089.partial.ps1 Get-MSCloudLoginConnectionProfile : The term 'Get-MSCloudLoginConnectionProfile' is not recognized as the name of a cmdlet, function, script file, or operable program. Check the spelling of the name, or if a path was included, verify that the path is correct and try again. At C:\Program Files\WindowsPowerShell\Modules\Microsoft365DSC\1.25.528.1\Modules\M365DSCReverse.psm1:571 char:39

  • ... $existingEndpoints = (Get-MSCloudLoginConnectionProfile -Worklo ...
  •                             ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    
    • CategoryInfo : ObjectNotFound: (Get-MSCloudLoginConnectionProfile:String) [], CommandNotFoundException
    • FullyQualifiedErrorId : CommandNotFoundException

Microsoft 365 DSC Version

1.25.528.1

Which workloads are affected

Azure Active Directory (Entra ID)

The DSC configuration

Export-M365DSCConfiguration -ApplicationId '3e0xx7-xx-4211-885e-9ff7exx9' -TenantId 'xxx.xx.xx' -CertificateThumbprint '37CD2213A032F291CA47F53Fssfxx3C9A9' -Components @('AADConditionalAccessPolicy') -Path "C:\M365\" -FileName "M365DSc-CA30052025.ps1"

Verbose logs showing the problem

PS C:\Users> C:\M365\CAExport.ps1
Exporting Microsoft 365 configuration for Components: AADConditionalAccessPolicy
 
Authentication methods specified:
- Service Principal with Certificate Thumbprint
 
[1/1] Extracting [AADConditionalAccessPolicy] using {CertificateThumbprint}...Connecting to {MicrosoftGraph}...❌
Partial Export file was saved at: C:\Users\PPD_IA~2\AppData\Local\Temp\2\462ecc68-4d69-41e9-8339-7c83372bd089.partial.ps1
Get-MSCloudLoginConnectionProfile : The term 'Get-MSCloudLoginConnectionProfile' is not recognized as the name of a cmdlet, function, script file, or operable program. Check the spelling of the name, or if a path was included, verify that the 
path is correct and try again.
At C:\Program Files\WindowsPowerShell\Modules\Microsoft365DSC\1.25.528.1\Modules\M365DSCReverse.psm1:571 char:39
+ ...       $existingEndpoints = (Get-MSCloudLoginConnectionProfile -Worklo ...
+                                 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : ObjectNotFound: (Get-MSCloudLoginConnectionProfile:String) [], CommandNotFoundException
    + FullyQualifiedErrorId : CommandNotFoundException

Environment Information + PowerShell Version

OsName               : Microsoft Windows Server 2022 Datacenter
OsOperatingSystemSKU : DatacenterServerEdition
OsArchitecture       : 64-bit
WindowsVersion       : 2009
WindowsBuildLabEx    : 20348.1.amd64fre.fe_release.210507-1500
OsLanguage           : en-US
OsMuiLanguages       : {en-US}

Key   : PSVersion
Value : 5.1.20348.2849
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.20348.2849
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

Aussupport avatar May 30 '25 03:05 Aussupport

@Aussupport Get-MSCloudLoginConnectionProfile is part of the MSCloudLoginAssistant module. In a Windows PowerShell session, what's the output of:

Get-Module MSCloudLoginAssistant -ListAvailable
Import-Module MSCloudLoginAssistant
Get-Command Get-MSCloudLoginConnectionProfile

FabienTschanz avatar Jun 21 '25 10:06 FabienTschanz

@Aussupport Any updates? Otherwise we'll close the issue.

FabienTschanz avatar Aug 11 '25 21:08 FabienTschanz