Closed AlexSen closed 4 years ago
Trying to get Token by using certificate (with client id/secret works well.
$ConfidentialClientOptions = New-Object Microsoft.Identity.Client.ConfidentialClientApplicationOptions -Property @{ ClientId = $MSALRequestData.clientID; TenantId = $MSALRequestData.TenantID } $MsalClientApplication = $ConfidentialClientOptions | Get-MsalClientApplication -ClientCertificate $MSALRequestData.Certificate $MSALToken = $MsalClientApplication | Get-MsalToken -Scope $MSALRequestData.Scope
And here is error:
Exception calling "GetResult" with "0" argument(s): "Keyset does not exist " At C:\Program Files\WindowsPowerShell\Modules\MSAL.PS\4.5.1.1\Get-MsalToken.ps1:288 char:13 + $AuthenticationResult = $AquireTokenParameters.ExecuteAsy ... + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + CategoryInfo : NotSpecified: (:) [], MethodInvocationException + FullyQualifiedErrorId : CryptographicException
Issue solved. My fault. Have not imported certificate into USER storage.
Trying to get Token by using certificate (with client id/secret works well.
And here is error: