Can a Gridview be loaded with the result of a task?

Leonidas Carranza Oliva 1 Reputation point

HI, I am trying to load a Gridview with the result of a query to Onedrive using Microsoft Graph, but it gives me the following error: The type System.Threading.Tasks cannot be loaded implicitly. I don't know if I have to convert the variable first, if another procedure is performed or if there is another way to do it.

private async Task Nube()
    var Usuario = new GraphServiceClient(new 
    DelegateAuthenticationProvider(async Request =>

       Request.Headers.Authorization = new 
       System.Net.Http.Headers.AuthenticationHeaderValue("Leonidas", "Token");

        var archivo = Usuario.Me.Drive.Root.Children

         GridView1.DataSource = archivo;
Microsoft Graph
Microsoft Graph
A Microsoft programmability model that exposes REST APIs and client libraries to access data on Microsoft 365 services.
10,522 questions
A set of technologies in the .NET Framework for building web applications and XML web services.
3,247 questions
{count} votes