Service Fabric Active Directory Authentication Failing

We’re currently using a Service Fabric deploy step and using Azure Active Directory to authenticate. We’re able to successfully connect to the cluster through infrastructure when setting up the cluster, but when actually running the Service Fabric deploy step we receive this error:

InvalidOperation: Cannot find an overload for “UserCredential” and the argument count: “2”.

Error:

  • … $UserCred = New-Object Microsoft.IdentityModel.Clients.ActiveDirector …

I believe the underlying code that Octopus is using to connect to Service Fabric through Active Directory is outdated or possibly incorrect.

Im able to reproduce this error locally if I used the Microsoft.IdentityModel.Clients.ActiveDirectory.UserCredential method passing in a username and password.

In order to fix, I used the Microsoft.IdentityModel.Clients.ActiveDirectory.UserPasswordCredential and passed in a username and password. This allowed me to successfully connect to Service Fabric using AD through powershell.

The underlying code seems to break any Octopus steps using a Service Fabric Active Directory connection.

This topic was automatically closed 31 days after the last reply. New replies are no longer allowed.