-
Notifications
You must be signed in to change notification settings - Fork 42
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Action Fails after Login via Az module #73
Comments
Can you confirm if you are still facing the issue? Just want to check if it is an intermittent issue. Thanks! |
As far as I can tell, the issue persists. Are you able to replicate? Thanks! |
This issue is idle because it has been open for 14 days with no activity. |
@BALAGA-GAYATRI: Am also facing the same issue. In my workflow, I have azure/login@v1 followed by azure/powershell@v1 calling a powershell script that stops all triggers in ADF in Azure. |
@vandanakr7: The issue persists. |
This issue is idle because it has been open for 14 days with no activity. |
I am also facing the same issue. Anyone able to resolve? |
I have got the issue resolved when I changed the PSversion of az powershell task to the latest version (>9). The v7.3.0 was set previously as azPSVersion which was causing the issue in my workflow. |
@vandanakr7 I tried with 9.3.0 version.. still same issue. In my case, I am invoking another ps1 file by passing some arguments. This was working fine couple of months back. |
I am calling a ps script in azure/powershell action after azure/login@v1 action and using azPSVersion: latest
|
@vandanakr7 It was still failing for me.
After moving that to end of the script file, its working fine. Thank you for the help. |
Hi @ptsouk , I've created a new issue Search-AzGraph "Your Azure credentials have not been set up or have expired" in GitHub Actions in Azure/azure-powershell. |
This issue is idle because it has been open for 14 days with no activity. |
The root cause of this issue is PowerShell/PowerShellGetv2#704. - name: Test ResourceGraph
uses: azure/powershell@v1
continue-on-error: true
with:
azPSVersion: "latest"
inlineScript: |
Import-Module Az.Accounts
if(-not (Get-Module Az.ResourceGraph -ListAvailable))
{
Install-Module Az.ResourceGraph -Scope CurrentUser -Force
}
$query = "resourcecontainers | where type == 'microsoft.resources/subscriptions' | project name, id | sort by name asc"
$subscriptions = Search-AzGraph -Query $query -UseTenantScope
$subscriptions |
This issue is idle because it has been open for 14 days with no activity. |
A better workaround IMO, it to use PSResourceGet to install Az.ResourceGraph, but skip installing dependencies with Microsoft.PowerShell.PSResourceGet\Install-PSResource -Repository 'PSGallery' -TrustRepository `
-Scope 'CurrentUser' -Name 'Az.ResourceGraph' -Reinstall -SkipDependencyCheck This issue can be closed, has nothing to do with this action. |
I am using
azure/login@v1
withenable-AzPSSession: true
to login to azure but the next stepazure/powershell@v1
fails with error:My yml is: here
I found a workaround - add a ps cmdlet at the start of the inline script.
So, the following fails:
but his one succeeds:
I'm looking forward for your help.
Thanks!
The text was updated successfully, but these errors were encountered: