Skip to content

A parameter cannot be found that matches parameter name 'ClientSecretCredential' for 'Connect-MgGraph' #2809

Closed
@spledfx

Description

@spledfx

Describe the bug

ERROR: A parameter cannot be found that matches parameter name 'ClientSecretCredential'.

Exception :
Type : System.Management.Automation.ParameterBindingException
Message : A parameter cannot be found that matches parameter name 'ClientSecretCredential'.
ParameterName : ClientSecretCredential
ErrorId : NamedParameterNotFound
Line : 46
Offset : 66
CommandInvocation :
MyCommand : Connect-MgGraph

Expected behavior

Should be logged in using interactions in the background, without a user to sign in.

How to reproduce

with below modules installed -
'Microsoft.Graph.Users' = '1.'
'Microsoft.Graph.Authentication' = '1.
'

Code snippet I am using -
Connect-MgGraph -TenantId 'xyz' -ClientSecretCredential $cred

SDK Version

No response

Latest version known to work for scenario above?

No response

Known Workarounds

No response

Debug output

Click to expand log ```
</details>


### Configuration

_No response_

### Other information

_No response_

Metadata

Metadata

Assignees

No one assigned

    Labels

    status:waiting-for-triageAn issue that is yet to be reviewed or assignedtype:bugA broken experience

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions