Azure / azure-powershell

Microsoft Azure PowerShell
Other
4.26k stars 3.86k forks source link

Unable to run any script in powershell console #25473

Open Ravikumar-1709 opened 4 months ago

Ravikumar-1709 commented 4 months ago

Description

Az.MSGraph.internal\Get-AzADApplication : SharedTokenCacheCredential authentication unavailable. Token acquisition failed for user suresh.deva@sssss. Ensure that you have authenticated with a developer tool that supports Azure single sign on. realm: authorization_uri: https://login.microsoftonline.com/common/oauth2/authorize client_id: 00000003-0000-0000-c000-000000000000 error_description: Continuous access evaluation resulted in challenge with result: InteractionRequired and code: LocationConditionEvaluationSatisfied error: insufficient_claims claims: eyJhY2Nlc3NfdG9rZW4iOnsibmJmIjp7ImVzc2VudGlhbCI6dHJ1ZSwidmFsdWUiOiIxNzIwNDQ1MDQ5In0sInhtc19ycF9pcGFkZHIiOnsidmFsdWUiOiIxMzYuMjI2LjI1Mi4xOTYifX19 At C:\Users\A0851750\OneDrive - Aon\Documents\WindowsPowerShell\Modules\Az.Resources\6.5.2\MSGraph.Autorest\custom\Get-AzADApplication.ps1:214 char:5

Issue script & Debug output

Get-AzADApplication

Environment data

PS C:\WINDOWS\system32> $PSVersionTable

Name                           Value                                                                                                                                                          
----                           -----                                                                                                                                                          
PSVersion                      5.1.22621.3672                                                                                                                                                 
PSEdition                      Desktop                                                                                                                                                        
PSCompatibleVersions           {1.0, 2.0, 3.0, 4.0...}                                                                                                                                        
BuildVersion                   10.0.22621.3672                                                                                                                                                
CLRVersion                     4.0.30319.42000                                                                                                                                                
WSManStackVersion              3.0                                                                                                                                                            
PSRemotingProtocolVersion      2.3                                                                                                                                                            
SerializationVersion           1.1.0.1

Module versions

Reinstalled and installed module as well but no luck

Error output

Az.MSGraph.internal\Get-AzADApplication : SharedTokenCacheCredential authentication unavailable. Token acquisition failed for user ravikumar.porappan@aon.com. Ensure that you have 
authenticated with a developer tool that supports Azure single sign on.
realm: 
authorization_uri: https://login.microsoftonline.com/common/oauth2/authorize
client_id: 00000003-0000-0000-c000-000000000000
error_description: Continuous access evaluation resulted in challenge with result: InteractionRequired and code: LocationConditionEvaluationSatisfied
error: insufficient_claims
claims: eyJhY2Nlc3NfdG9rZW4iOnsibmJmIjp7ImVzc2VudGlhbCI6dHJ1ZSwidmFsdWUiOiIxNzIwNDQ1MDQ5In0sInhtc19ycF9pcGFkZHIiOnsidmFsdWUiOiIxMzYuMjI2LjI1Mi4xOTYifX19
At C:\Users\suresh\OneDrive - Aon\Documents\WindowsPowerShell\Modules\Az.Resources\6.5.2\MSGraph.Autorest\custom\Get-AzADApplication.ps1:214 char:5
+     Az.MSGraph.internal\Get-AzADApplication @PSBoundParameters
+     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : NotSpecified: (:) [Get-AzADApplication_List], AuthenticationFailedException
    + FullyQualifiedErrorId : Microsoft.Azure.PowerShell.Cmdlets.Resources.MSGraph.Cmdlets.GetAzADApplication_List
isra-fel commented 4 months ago

Hi have you tried set-azconfig -EnableLoginByWam $false

Adam-S-Daniel commented 3 months ago

Hi have you tried set-azconfig -EnableLoginByWam $false

I had the same problem, and this workaround was successful.

Ravikumar-1709 commented 3 months ago

But I tried this as well but didn't help

On Mon, 29 Jul, 2024, 21:39 Adam Daniel, @.***> wrote:

Hi have you tried set-azconfig -EnableLoginByWam $false

I had the same problem, and this workaround was successful.

— Reply to this email directly, view it on GitHub https://github.com/Azure/azure-powershell/issues/25473#issuecomment-2256334932, or unsubscribe https://github.com/notifications/unsubscribe-auth/BJXKTMR5DN335S6XHZXJSXTZOZSMZAVCNFSM6AAAAABKQ6FXPCVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDENJWGMZTIOJTGI . You are receiving this because you authored the thread.Message ID: @.***>

Ravikumar-1709 commented 3 months ago

Hi Team

I tried all the ways but I could not find where its make this issue psissue

Ravikumar-1709 commented 3 months ago

image