Skip to content

Commit

Permalink
Service Fabric active directory DLL
Browse files Browse the repository at this point in the history
  • Loading branch information
ericsciple committed Jan 20, 2017
1 parent 9fd3f8a commit a47083b
Show file tree
Hide file tree
Showing 4 changed files with 17 additions and 4 deletions.
14 changes: 14 additions & 0 deletions Tasks/ServiceFabricDeploy/make.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,18 @@
{
"externals": {
"nugetv2": [
{
"name": "Microsoft.IdentityModel.Clients.ActiveDirectory",
"version": "2.23.302261847",
"repository": "https://www.nuget.org/api/v2/",
"cp": [
{
"source":"lib/net45/Microsoft.IdentityModel.Clients.ActiveDirectory.dll"
}
]
}
]
},
"cp": [
{
"source": "ServiceFabricSDK",
Expand Down
2 changes: 1 addition & 1 deletion Tasks/ServiceFabricDeploy/task.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
"version": {
"Major": 1,
"Minor": 2,
"Patch": 1
"Patch": 2
},
"minimumAgentVersion": "1.95.0",
"groups": [
Expand Down
2 changes: 1 addition & 1 deletion Tasks/ServiceFabricDeploy/task.loc.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
"version": {
"Major": 1,
"Minor": 2,
"Patch": 1
"Patch": 2
},
"minimumAgentVersion": "1.95.0",
"groups": [
Expand Down
3 changes: 1 addition & 2 deletions Tasks/ServiceFabricDeploy/utilities.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -90,8 +90,7 @@ function Get-AadSecurityToken
Write-Host (Get-VstsLocString -Key ClientAppId -ArgumentList $clientApplicationId)

# Acquire AAD access token
$serverOMDirectory = Get-VstsTaskVariable -Name 'Agent.ServerOMDirectory' -Require
Add-Type -LiteralPath "$serverOMDirectory\Microsoft.IdentityModel.Clients.ActiveDirectory.dll"
Add-Type -LiteralPath "$PSScriptRoot\Microsoft.IdentityModel.Clients.ActiveDirectory.dll"
$authContext = Create-Object -TypeName Microsoft.IdentityModel.Clients.ActiveDirectory.AuthenticationContext -ArgumentList @($authority)
$authParams = $ConnectedServiceEndpoint.Auth.Parameters
$userCredential = Create-Object -TypeName Microsoft.IdentityModel.Clients.ActiveDirectory.UserCredential -ArgumentList @($authParams.Username, $authParams.Password)
Expand Down

0 comments on commit a47083b

Please sign in to comment.