Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

109
Visualizações
Subscribe to a folder with MS graph SDK

How can I make it work with the Microsoft Graph SDK (.Net and C#) that I can only subscribe to one folder ? (I want to code a webhook based on this).

public async Task<ActionResult<string>> Get() {
      var graphServiceClient = GetGraphClient();
      var sub = new Microsoft.Graph.Subscription();
      
      sub.ChangeType = "updated";
      sub.NotificationUrl = config.Ngrok + "/api/notifications";

      sub.Resource = "/drives/{driveID}/root/";
      sub.ExpirationDateTime = DateTime.UtcNow.AddMinutes(5);
      sub.ClientState = "SecretClientState";

      var newSubscription = await graphServiceClient.Subscriptions.Request().AddAsync(sub);

So far I can only subscribe to everything in the root but not to a specific folder in Onedrive.

over 4 years ago · Santiago Trujillo
1 Respostas
Responde à pergunta

0

Yes, On personal OneDrive you could subscribe to the root folder or any subfolder within that drive but in OneDrive for business, you could only subscribe to root folder. Let me know if you required further assistance on this.

Note: You cannot subscribe to drive or driveItem instances that are not folders, such as individual files. You could refer to our official document here.

So you can create folder within the root, in that case you could allow your user to create folder where they can upload their files.

Hope it would helps

over 4 years ago · Santiago Trujillo Relatório
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda