-
Notifications
You must be signed in to change notification settings - Fork 1.8k
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
Application crash while requesting the events from Microsoft outlook #3903
Comments
@Sasikumar3595 can you share more info about this method call that looks like it's async, but isn't awaited?
Is |
I have tried that code also. The exception was raised when I comment the |
Hey friends! Jumping into this thread as I have the exact same problem and a workaround 🎉 I am using Microsoft.Graph v4.20.0 with an android application running .NET 6 via Uno Platform. I am wondering if this problem should be documented in the core xamarin-android repository instead of .NET MAUI. Since I am running into an identical issue on Uno Platform I am suspect that this also impacts native android running .NET 6. WorkaroundThe Microsoft Graph API suggests using the API var response = await graphClient.Me
.Request()
.Select(user => new
{
Id = user.Id,
DisplayName = user.DisplayName,
UserPrincipalName = user.UserPrincipalName
})
.GetResponseAsync();
var data = await response.Content.ReadAsStringAsync();
var me = JsonConvert.DeserializeObject<User>(data); Original Code and ErrorBelow is the original code that caused the same problem as reported in this thread. var graphClient = new GraphServiceClient(httpClient);
graphClient.AuthenticationProvider = this;
var me = await graphClient.Me
.Request()
.Select(user => new
{
Id = user.Id,
DisplayName = user.DisplayName,
UserPrincipalName = user.UserPrincipalName
})
.GetAsync(); Error Message
|
I also have this issue, running in preview 14. I could confirm that the workaround @ahoefling has done is working. |
This looks to use the https://www.nuget.org/packages/Microsoft.Graph.Core/ package which does not support net6.0-ios. It will need to be updated to be built against and support net6.0-ios to resolve this. |
Description
We have created an application to access the outlook event and show it on list view. We are authenticating the account by using the client id and we faced the System.TypeLoadException but it is working fine in windows.
We configure the sample by the steps below:
The exception was raised while get events after the authentication.
Client.Me.Events.Request().GetAsync();
Note: The issue did not raised on Windows
Steps to Reproduce
Client.Me.Events.Request().GetAsync();
In App.cs
In MainActivity
In MainPage,
Version with bug
Preview 10 (current)
Last version that worked well
Unknown/Other
Affected platforms
iOS, Android
Affected platform versions
Android API 31
Did you find any workaround?
No
Relevant log output
The text was updated successfully, but these errors were encountered: