-
Notifications
You must be signed in to change notification settings - Fork 252
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
System.TypeLoadException: Could not load type 'Microsoft.Graph.IAutehnticationProviderOption' from assembly 'Microsoft.Graph.Core' #1854
Comments
Thanks for raising this @dlgombert This is related to AzureAD/microsoft-identity-web#2097. Any chance using this works out for you? https://gist.github.com/ashelopukho/5b00944c7744ebb4f9baa348e86f7e0e |
I've worked with the gist for awhile,, and I'm unable to make it work. The underlying issue is that TokenProvider gets invoked before the user is Authenticated, and indeed the user is never authenticated. The error here is: I'm invoking If I'm reading the back and forth correctly, it seems like my best option is to roll back to 4.5? But I can't be the only one with this use case. Any insight? |
Also breaking for me to try and upgrade to the new Graph Client in a Blazor Server application that has been working for years using Graph and Azure AD. |
I've managed to get it to work after replacing dependency Microsoft.Identity.Web.MicrosoftGraph with Microsoft.Identity.Web.GraphServiceClient. |
Closing this for now |
I've tried a million variations of the following code, implementing in services, directly in controllers, etc. Everywhere I try leads to the same error:
System.TypeLoadException: Could not load type 'Microsoft.Graph.IAuthenticationProviderOption' from assembly 'Microsoft.Graph.Core, Version=3.0.6.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35'.
To Reproduce
Expected behavior
I expect the graph query I call which is:
to return the users for the app.
I can show configuration if it helps.
When I tried to create a scoped service, the service was unable to be resolved in the controller. The debugger would never even make it that far, despite having registered it and confirmed that it was registered as scoped.
I'm still somewhat new to Csharp, so this could definitely be operator error, but as far as I can tell, I've followed the documentation, and I've tried enough changes that I ought to have hit on it by now, lol.
The text was updated successfully, but these errors were encountered: