Open
Description
Description
- We use
Connect-AzAccount
in an environment, where we only have an access token. - User can't login interactively and no credentials are available. Thus, we can' use
-Credential
as well. - But we have to use data plane cmdlets of
Az.Attestation
, which requires us to use-AuthScope Attestation
withConnect-AzAccount
. Here is how our cmdlet looks likeConnect-AzAccount -AuthScope Attestation -AccessToken <token> -<other common arguments>
. - But above invocation doesn't work since
-AccessToken
and-AuthScope
can't be used together in same parameter set. - This poses a blocker for us since we only have an access token for connecting to Azure.
Our questions:
- Why are
-AccessToken
and-AuthScope
mutually exclusive? - What is our alternative? We can' use interactive authentication or
-Credential
as well.
Issue script & Debug output
Not providing due to sensitive nature of logs. Let me know if they are absolutely needed.
Environment data
Name Value
---- -----
PSVersion 5.1.25398.469
PSEdition Desktop
PSCompatibleVersions {1.0, 2.0, 3.0, 4.0...}
BuildVersion 10.0.25398.469
CLRVersion 4.0.30319.42000
WSManStackVersion 3.0
PSRemotingProtocolVersion 2.3
SerializationVersion 1.1.0.1
Module versions
2.13.1 Az.Accounts
6.11.2 Az.Resources
2.0.0 Az.Attestation
Error output
Parameter set cannot be resolved using the specified named parameters. One or more parameters issued cannot be used together or an insufficient number of parameters were provided.