Closed Maxinoume closed 3 years ago
@Maxinoume Can you provide more info on the package version you are trying to use and the target version of .Net?
I'm using the latest package version (v1.0.0-preview.7) and .Net 4.8. But I'd also like to use it on .Net Core 5. I've now just realized that it says to use .Net 4.5 but I can't do that because of other parts of the codebase.
Could this really be the problem? I'm surprised the manager let me install it if my project didn't meet the requirements.
I saw that there were #IF NET45
in InteractiveAuthenticationProvider
that most probably cause my issue. I cloned the solution on my end to try to fix the issue but when using this custom DLL, my project didn't recognize the controller Doesn't contain a controller with X parameters
on build (instead of the similar exception but on execution with the unedited Nuget).
I didn't want to spend much time on this so I decided to go without this wrapper and just implement my own basic token handling. I don't need this issue fixed anymore so this issue can be closed if no effort wants to be wasted here.
I'm trying to use Microsoft.Graph Api to get a list of users. I am able to authenticate on the api. I receive the Token and basic profile info upon login.
Then I am trying to use the Microsoft.Graph.Auth SDK/nuget found here to generate my requests. Here is a barebone example of what I am trying to do (you can also find this example in the doc of the package.
But I get the error
System.MissingMethodException: 'Method not found: 'Void Microsoft.Graph.Auth.IntegratedWindowsAuthenticationProvider..ctor(Microsoft.Identity.Client.IPublicClientApplication, System.Collections.Generic.IEnumerable`1<System.String>)'.'
before even entering the methodtest()
. The message says it cannot findIntegratedWindowsAuthenticationProvider
but the package is installed and I can navigate to the constructor (F12) without issue.If I remove the line with
IntegratedWindowsAuthenticationProvider
, the code executes without crashing. And I can authenticate into the Api successfully. I tried moving the line after the successful authentication but I get the same error.AB#9189