Open twhitex opened 3 months ago
@twhitex I apologize for the delayed response. Thanks for reporting this, I've entered an internal ticket for review and prioritization: OKTA-742391
@bryanapellanes-okta I am running into the same issue and in addition, I have a console app that that works but in AspNetCore the same code returns (0) and no error.
var config = new Configuration
{
OktaDomain = "",
Token = ""
};
var apiClient = new GroupApi(config);
var client = await apiClient.ListGroups().ToListAsync(cancellationToken: applicationLifetime.ApplicationStopping);
logger.LogInformation("Groups: {0}", client.Count);
I verified that this issue is related to https://github.com/okta/okta-sdk-dotnet/issues/736
Describe the bug?
We are on dotnet8. Something in
Okta.Sdk
relies onMicrosoft.Bcl.AsyncInterfaces v7.0.0
or greater but is not specifically requiring this package. Building the project is fine. However, if we run our project and call anyOkta.Sdk
apis, it will crash until we add a reference toMicrosoft.Bcl.AsyncInterfaces v7.0.0
or greater.What is expected to happen?
Should not receive a runtime error.
What is the actual behavior?
Runtime error when using any Okta.Sdk apis.
Reproduction Steps?
create new dotnet8 console project dotnet new console --name yourprojname
add reference add
Okta.Sdk 7.0.6
referenceadd the following code to program.cs - replacing
yourtoken
andyourdomain
with the correct parametersusing Okta.Sdk.Api;
using Okta.Sdk.Client;
var userApi = new UserApi(new Configuration { Token = "yourtoken", OktaDomain = "yourdomain" });
var users = userApi.ListUsers();
run the project error received:
Unhandled exception. System.IO.FileNotFoundException: Could not load file or assembly 'Microsoft.Bcl.AsyncInterfaces,
Version=7.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51'. The system cannot find the file specified.
File name: 'Microsoft.Bcl.AsyncInterfaces, Version=7.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51'
at Program.<Main>$(String[] args)
Additional Information?
No response
.NET Version
8.0.204
SDK Version
7.0.6
OS version
No comment