microsoft / service-fabric

Service Fabric is a distributed systems platform for packaging, deploying, and managing stateless and stateful distributed applications and containers at large scale.
https://docs.microsoft.com/en-us/azure/service-fabric/
MIT License
3.03k stars 401 forks source link

Can't connect to SFMC through PowerShell using Server Certificate Common Name #1429

Closed sergiojrdotnet closed 6 months ago

sergiojrdotnet commented 1 year ago

Describe the bug I'm trying to connect to SFMC through PowerShell using my Azure AD Credentials and informing the server common name instead of certificate thumbprint. So, by this way, I will not need to update my internal script every time when the certificate rotates.

Area/Component: PowerShell Module

To Reproduce Steps to reproduce the behavior:

  1. Go to Windows Powershell
  2. Use the command: Connect-ServiceFabricCluster -ConnectionEndpoint "mysfmc.westus.cloudapp.azure.com:19000" -ServerCommonName "mycert.sfmc.azclient.ms" -AzureActiveDirectory

Expected behavior Windows PowerShell should ask for the AD credentials and connect to the SFMC successfully. Just like my actual script command: Connect-ServiceFabricCluster -ConnectionEndpoint "mysfmc.westus.cloudapp.azure.com:19000" -ServerCertThumbprint "mycertthumbprint" -AzureActiveDirectory

Observed behavior: The command returns the following warnings and error:

WARNING: Failed to contact Naming Service. Attempting to contact Failover Manager Service...
WARNING: Failed to contact Failover Manager Service, Attempting to contact FMM...
False
Connect-ServiceFabricCluster: FABRIC_E_SERVER_AUTHENTICATION_FAILED: 0x800b0109

Screenshots image

Service Fabric Runtime Version: 8.2.1571.9590

Environment:


Assignees: /cc @microsoft/service-fabric-triage Participants: @luizdalciconfeio