Reputation: 2747
I use this powershell script to generate an azure AD jwt token. It is missing the audience claim. how do i include that?
$connectionDetails = @{
'TenantId' = '****'
'ClientId' = '****'
'Interactive' = $true
'Scopes' = ''
'LoginHint' = '****'
}
$token = Get-MsalToken @connectionDetails
Write-Output $token
Upvotes: 0
Views: 985
Reputation: 9539
Summary comments are posted as answers.
As I said in the comments, usually, the value of the scope
is the aud
claim in the token. Because you did not set the scope
in the script, the token you obtained has no aud
claim.
So you must set the scope, for example:
'Scopes' = 'https://graph.microsoft.com/.default'
Upvotes: 1