entra-powershell
entra-powershell copied to clipboard
New-EntraApplicationKeyCredential doesn't work "A parameter cannot be foud that matches parameter name 'Value'"
I am attempting to execute New-EntraApplicationKeyCredential, following the documentation as written.
To Reproduce
I am attempting to upload a certificate, strictly following the steps in the documentation.
Executing this command:
New-EntraApplicationKeyCredential `
-ApplicationId $app.Id `
-CustomKeyIdentifier $base64Thumbprint `
-Type 'AsymmetricX509Cert' `
-Usage 'Verify' `
-Value $base64Value `
-StartDate $cert.GetEffectiveDateString() `
-EndDate $cert.GetExpirationDateString()
Results in the following error:
Add-MgApplicationKey: A parameter cannot be found that matches parameter name 'Value'.
Expected behavior
Since I followed the documentation, I expected my certificate's public key to be uploaded to Entra and associated with the Entra application.
Debug Output
DEBUG: ============================ TRANSFORMATIONS ============================
DEBUG: Value : MIIDFjCCAf6gAwIBAgIQFCalLTPMF4JGPMnZQ/pj4jANBgkqhkiG9w0BAQsFADAeMRwwGgYDVQQDDBNTQ0lNIEFnZW50IEVudHJhIElkMB4XDTI1MDUwOTA1MzAyMVoXDTI2MDUwOTA1NTAyMVowHjEcMBoGA1UEAwwTU0NJTSBBZ2VudCBFbnRyYSBJZDCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAK/wDivkY7P8aRyGrviEREkfqrlc0fq21ttZY+2nV7BhJTKEcfcTTMHZVaVq4jMzTTzFOJ2FF4bR6lvoQ+OtKzEELpD5mdlVPEIss6llyMJwM8Gx2YkLai9lqDw3JPHl2EjPam2rvHo17n4PnlmyPYAGiPPfJSHHM7In9r+vEh9ODr/e1exq1GMzogL5jdsXImJWM7H7pzP3hl7PDIUJYU0UnRX9lXei3eLrBUNVYAknBxU+l24YjEu+JC8RS76PC+tMTuFZ+4LSSW5b85+s5csNEzd3TCffMiSuOIyasRgHWCchxoeXh0XH1X0TD508Gp1b19umCQ48avSZ7wcW+pUCAwEAAaNQME4wDgYDVR0PAQH/BAQDAgWgMB0GA1UdJQQWMBQGCCsGAQUFBwMCBggrBgEFBQcDATAdBgNVHQ4EFgQUGWYSVJWlRxIfnj8S53GAkcClpzswDQYJKoZIhvcNAQELBQADggEBAGrBPoGOwAffNlCMjaZ3NkcYoxt13zCyIO5SvzmHkTHrKaJOorG1TF2SrF9Hej7EkXBm3ftAIR24zokoZNFbIAZl2M7NQLtoY5sdVo3G1LEdupUyhaYqF77I34X22dSZlP/WBJTzBByF7Gcdkiqv7eIkwcdgA29tsz0fWK4uJTJwNvCDJbj/DUopc0J9ofdHLPn1tRFQcOUTJpzPcZrRCn4wlrQxXtSQTRzoSIW35WJbuDExUzp/lpL8Avjq2UK0RzRQYg53gvTlpRXS7O09QPe9EXbwUjDfzHKUnXFBs8JDhN5bPuFBnx6i5szVx8E50DRVs1vHiG32XGtf1ZZ6U7c=
DEBUG: StartDate : 05/09/2025 15:30:21
DEBUG: Usage : Verify
DEBUG: CustomKeyIdentifier : N9rkOQMTHC6hzXL0tQGTWdfy/ws=
DEBUG: EndDate : 05/09/2026 15:50:21
DEBUG: Debug : True
DEBUG: Type : AsymmetricX509Cert
DEBUG: ApplicationId : 70881ad8-102f-4b82-86e0-b0686a742762
DEBUG: =========================================================================
Add-MgApplicationKey: A parameter cannot be found that matches parameter name 'Value'.
Module Version
ModuleType Version PreRelease Name ExportedCommands
---------- ------- ---------- ---- ----------------
Script 1.0.7 Microsoft.Entra.Applications {Add-EntraApplicationOwner, Add-EntraServicePrincipalDelegatedPermissionClassification, Add-EntraServicePrincipalOwner, Get-EntraApplication…}
Script 1.0.7 Microsoft.Entra.Authentication {Add-EntraEnvironment, Connect-Entra, Disconnect-Entra, Find-EntraPermission…}
If a module cannot be installed or imported, please run Get-Module -ListAvailable and paste the output. -->
Environment Data
Name Value
---- -----
PSVersion 7.5.0
PSEdition Core
GitCommitId 7.5.0
OS Microsoft Windows 10.0.20348
Platform Win32NT
PSCompatibleVersions {1.0, 2.0, 3.0, 4.0…}
PSRemotingProtocolVersion 2.3
SerializationVersion 1.1.0.1
WSManStackVersion 3.0
Additional context
"Usage" is also not a valid parameter. It appears that the New-EntraApplicationKeyCredential wrapper is not building the Params hashtable to correctly call Add-MgApplicationKey.