We have had an Azure Function V3 that has a reference to another C# project in a VS 2019 solution. There are some extension methods in the other C# project using System.IdentityModel.Tokens.Jwt Version=5.6.0.0 assembly to perform token validation. The Azure Function has been working fine by using those extension methods to validate token. The following code snippet shows the nuget packages:
<PackageReference Include="Microsoft.Azure.Functions.Extensions" Version="1.0.0" />
<PackageReference Include="Microsoft.Azure.WebJobs.Extensions.SignalRService" Version="1.0.2" />
<PackageReference Include="Microsoft.Azure.EventGrid" Version="3.2.0" />
<PackageReference Include="Microsoft.Azure.WebJobs.Extensions.EventGrid" Version="2.1.0" />
<PackageReference Include="Microsoft.NET.Sdk.Functions" Version="3.0.3" />
We upgraded the nuget packages in the azure function according to the following list and started receiving the exception reflected the title of this ticket. What's the solution or workaround to solve this problem?
<PackageReference Include="Microsoft.Azure.Functions.Extensions" Version="1.0.0" />
<PackageReference Include="Microsoft.Azure.WebJobs.Extensions.SignalRService" Version="1.0.2" />
<PackageReference Include="Microsoft.Azure.EventGrid" Version="3.2.0" />
<PackageReference Include="Microsoft.Azure.WebJobs.Extensions.EventGrid" Version="2.1.0" />
<PackageReference Include="Microsoft.Azure.WebJobs.Script.ExtensionsMetadataGenerator" Version="1.1.4" />
<PackageReference Include="Microsoft.NET.Sdk.Functions" Version="3.0.4" />
For now, we had to downgrade the packages again to be able to move forward.
/cc @jeffhollan @anthonychu
We upgraded Microsoft.NET.Sdk.Functions to version 3.0.5 and the issue still persists. Unfortunately it has become a roadblock unless we do not upgrade.
/cc @paulbatum
Thanks for the issue report! Go ahead and stay on 3.0.3 while we investigate.
cc @brettsam @fabiocav
I'm also getting this issue but with Microsoft.IdentityModel.Tokens 5.6.0 nuget package.
@Arash-Sabet @kuromukira we'll take a closer look at this. In the meantime, you can also add the following property to your project (which will allow you to upgrade):
<_FunctionsSkipCleanOutput>true</_FunctionsSkipCleanOutput>
Just came here to confirm the issue.
Upgraded to 3.0.5 and getting the same message when starting the functions app locally. Didn't try to publish it yet, though.
Downgrading to 3.0.3 solves it for now. Will wait for an update.
same error and solution worked but i'm using v1.0.34
Got into same problem... and worked out that it works with:
Microsoft.NET.Sdk.Functions <= 1.0.31 & System.IdentityModel.Tokens.Jwt <= 6.5.0 (latest)
OR
Microsoft.NET.Sdk.Functions <= 3.0.5 (latest) & System.IdentityModel.Tokens.Jwt <= 5.3.0
so it's your choice which one you need in the latest.
Hope this helps.
Hi @tkc-github , thank you for the information.
Have you tried Microsoft.NET.Sdk.Functions <= 3.0.5 (latest) & System.IdentityModel.Tokens.Jwt <= 6.5.0 (latest)?
yes and it didn't work
the only way to make it working was to downgrade one of them as per my previous comment
If the workaround @fabiocav mentioned worked, I'm going ahead and closing this issue since we're tracking a fix for the same here. https://github.com/Azure/azure-functions-host/issues/5894
Most helpful comment
Thanks for the issue report! Go ahead and stay on 3.0.3 while we investigate.
cc @brettsam @fabiocav