You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I hoped the script would work like this but I'm getting Authentication issues. In a separate funtion I can use the same identity to authN to Azure resources.
No, I'm running this in a Azure Function App (PowerShell). The function app has a managed identity assigned to it. That same identity is configured in Azure DevOps.
Now that DevOps support managed identities I would like to use that to automate some tasks rather than using a PAT.
Previously I used this code to connect from an Azure PowerShell function app:
$splat = @{
Collection = 'xxxxxxxxxxxxx'
Project = 'Management%20Infrastructure'
Instance = 'https://dev.azure.com/'
ApiVersion = '7.1-preview'
SessionName = 'mySession'
PersonalAccessToken = $env:PAT
}
$session = New-APSession @Splat
I hoped the script would work like this but I'm getting Authentication issues. In a separate funtion I can use the same identity to authN to Azure resources.
$splat = @{
Collection = 'xxxxxxxxxxxx'
Project = 'Management%20Infrastructure'
Instance = 'https://dev.azure.com/'
ApiVersion = '7.1-preview'
SessionName = 'mySession'
}
$session = New-APSession @Splat
I hope you can point me in the right direction.
Regards,
BertusV
The text was updated successfully, but these errors were encountered: