-
Notifications
You must be signed in to change notification settings - Fork 247
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
Upgrade 4.50 sdk to 5.0 - Reference to type IAuthenticationProvider claims it is defined in Microsoft.Graph.Core, but cannot be found #1695
Comments
Maybe this code can give you some pointers, I was facing similar problem in Blazor WebAssembly (wanted to call Graph directly instead of building yet another proxy to graph). https://github.com/svrooij/BlazorGraphExplorer/commits/graph-v5/BlazorGraphExplorer |
I´ve the same error. Steps:
Please help |
The call to @benjamin79 Any chance you can confirm if the upgrade is from v4 to v5? |
@andrueastman yes, the one vs2022 installs automatically with the template is v4. I then updated the libs |
Thank you @andrueastman, I've found a relevant issue in the I think this issue would be okay to close out since it's not up to the sdk to update, but it would be nice to note in some documentation the current limitations on upgrading since the default projects for blazor with auth include And thank you @svrooij for the gist. It does help for testing the new sdk directly from our client project. |
Describe the bug
I went ahead and upgraded my Microsoft.Graph nuget package from 4.5 to 5.0.
After going through the docs and referencing the new
Microsoft.Graph.Models
library and updating the actual Mail api call ->I'm getting an error of
System.TypeLoadException: Could not load type 'Microsoft.Graph.IAuthenticationProviderOption' from assembly 'Microsoft.Graph.Core, Version=3.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35'.
once I make a request (to get a basic inbox fetch for the current logged in user).I thought that there might be something wrong with how I'm registering the microsoft graph client in my
Program.cs
. I chose a different override for the.AddMicrosoftGraph
function and now I receive a compiler error preventing the build of the solution.Error
CS7069: Reference to type 'IAuthenticationProvider' claims it is defined in 'Microsoft.Graph.Core', but it could not be found
To Reproduce
This might be a little complicated, but I've just got an aspnet core hosted Blazor project. In my server project of this I've got an "on behalf of" flow going to have the Blazor page -> call Server endpoint -> then calls the microsoft graph.
Relevant Program.cs
Dummy Graph Controller
Expected behavior
A clear and concise description of what you expected to happen.
Desktop (please complete the following information):
Additional context
I've tried explicitly including the 3.0.1 version of the
Microsoft.Graph.Core
nuget package, but my issue is not resolved.I'm open to other ways of implementing on behalf of flow. Adding relevant doc Microsoft Doc
The text was updated successfully, but these errors were encountered: