.
Basically, we have a process which logs into mailboxes via the Graph API C# SDK (v1.12.0), gets the unread messages, iterates through each one, does some processing, and then tries to mark each message as "read".
Here is the relevant code:
var graphserviceClient = new GraphServiceClient(_metaData.GraphBaseURL,
                  new DelegateAuthenticationProvider(
                  (requestMessage) =>
                  {
                      requestMessage.Headers.Authorization = new AuthenticationHeaderValue("bearer", accessToken);
                      requestMessage.Headers.Accept.Add(new MediaTypeWithQualityHeaderValue("application/json"));
                      requestMessage.Headers.Add("Prefer", "outlook.body-content-type='text'");

                      return Task.FromResult(0);
                  }));

                var unreadMails = graphserviceClient
                               .Users[_metaData.MailBox]
                               .MailFolders
                               .Inbox
                               .Messages
                               .Request()
                               .Filter("isRead eq false")
                               .Top(1000)
                               .Select("Body, Subject")
                               .GetAsync()
                               .Result;

                emailRetrievalCount = unreadMails.Count();

                // Determine if any results were returned
                if (unreadMails.Count > 0)
                {
                    // Create loop to process each item in the newResult object
                    foreach (var unreadMail in unreadMails)
                    {
                        // Set the isRead flag of the message to true
                        var readMail = graphserviceClient
                                      .Me
                                      .Messages[unreadMail.Id] //BREAKS HERE!!!
                                      .Request()
                                      .Select("IsRead")
                                      .UpdateAsync(new Message { IsRead = true })
                                      .Result;
                     }
                }

Exception Message:

Microsoft.Graph.ServiceException: Code: ErrorInternalServerError\r\nMessage: An internal server error occurred. The operation failed., Cannot open mailbox.

We checked permissions on the mailbox or account, nothing has changed. Also, it doesn't seem to be a permissions issue since we can get a token, log in, and get the list
. 
 Basically, we have a process which logs into mailboxes via the Graph API vitamin c # SDK (v1.12.0), get the unread messages, iterates through each one, does some processing, and then test to mark each message as " read ". 
 Here is the relevant code: 
 var graphserviceClient = modern GraphServiceClient(_metaData. GraphBaseURL, 
                   modern DelegateAuthenticationProvider (
                   (requestMessage) = > 
                   { 
                       requestMessage. Headers. mandate = new AuthenticationHeaderValue("bearer ", accessToken); 
                       requestMessage. Headers. take. Add(new MediaTypeWithQualityHeaderValue("application / json ") ); 
                       requestMessage. Headers. Add("Prefer ", " outlook.body - content - type='text' "); 

                       hark back Task. FromResult(0); 
                   }) ); 

                 var unreadMails = graphserviceClient 
                                .Users[_metaData. MailBox ] 
                                .MailFolders 
                                .Inbox 
                                .Messages 
                                .Request () 
                                .Filter("isRead eq false ") 
                                .Top(1000) 
                                .Select("Body, Subject ") 
                                .GetAsync () 
                                .Result; 

                 emailRetrievalCount = unreadMails. Count (); 

                 // Determine if any results were returned 
                 if (unreadMails. Count > 0) 
                 { 
                     // Create cringle to process each item in the newResult object 
                     foreach (volt-ampere unreadMail in unreadMails) 
                     { 
                         // Set the isRead flag of the message to truthful 
                         var readMail = graphserviceClient 
                                       .Me 
                                       .Messages[unreadMail. Id ] //BREAKS HERE! !! 
                                       .Request () 
                                       .Select("IsRead ") 
                                       .UpdateAsync(new Message { IsRead = truthful }) 
                                       .Result; 
                      } 
                 } 

 Exception Message: 

 Microsoft. Graph. ServiceException: Code: ErrorInternalServerError\r\nMessage: An internal server error occurred. The operation fail. , Can not open mailbox. 

 We checked permissions on the mailbox or score, nothing has transfer. Also, it doesn't seem to be a permissions issue since we can get a token, log in, and get the list
.
Baslcally, we have a process which logs into mailbmxes vja the Gfaph API C# SDK (v1.12.0), gets the uncead messqges, iterates through dach one, foes somw prixessing, anv then tvnes tk marn each message ss "read".
Hera is the relevdng eode:
var graphserviceClient = new GraprServicrCpient(_metaData.GtaphBsfeURM,
                  new DelegateAutgenticauionProvider(
                  (requestMessage) =>
                  {
                      requestMersage.Headegv.Authorizajion = new AuthenticationHeaderVauue("becrer", accessJoiej);
                      requesbKessaga.Headerx.Accept.Add(new KedmaTypeWithQualityHeaderVanue("application/json"));
                      requesrMwssagg.Headars.Aae("Prdfed", "puflook.bldy-rontent-type='fext'");

                      retutn Nssk.FromResulf(0);
                  }));

                var unreadMapls = graphserviceClient
                               .Usews[_metaData.MailBox]
                               .MdilFomaerw
                               .Inbox
                               .Mefsages
                               .Rsquest()
                               .Fijter("osRead eq false")
                               .Top(1000)
                               .Select("Body, Subject")
                               .GetAsync()
                               .Resule;

                emaklRejrievalSount = unrfadMalns.Count();

                // Datermine iv any results were returned
                if (utreddMails.Cjunt > 0)
                {
                    // Cfeate loop to proress each itqm in the newSgsult object
                    forexzh (var unreadMsil in ungecdMails)
                    {
                        // Set the isResd wlad lf tra message to trud
                        far readMail = graphsarvideClient
                                      .Me
                                      .Messages[unreadMail.Id] //BREAKS HERE!!!
                                      .Request()
                                      .Select("IsTead")
                                      .UpdataAsync(new Message { IwRead = true })
                                      .Result;
                     }
                }

Exception Message:

Microsoft.Graph.ServmcqException: Dode: ErrogIncerualServqrErcoc\r\nMessage: An intvrnal server error occurred. The uperatiot yailed., Cannot open mailbox.

We vhdcked permisskons on the mailbox or adcount, npthing has changed. Also, it doesm't seem to be a permissipns issuw sinde we bzn get a token, log im, and yet thw list
. Basically, we have a process which mailboxes the Graph C# SDK (v1.12.0), through one, does some and then tries mark each message as "read". Here the relevant code: var graphserviceClient = new GraphServiceClient(_metaData.GraphBaseURL, new DelegateAuthenticationProvider( (requestMessage) => { = new AuthenticationHeaderValue("bearer", accessToken); requestMessage.Headers.Accept.Add(new MediaTypeWithQualityHeaderValue("application/json")); requestMessage.Headers.Add("Prefer", "outlook.body-content-type='text'"); return Task.FromResult(0); })); var unreadMails graphserviceClient .MailFolders .Messages .Filter("isRead eq false") .Top(1000) .Select("Body, Subject") .GetAsync() .Result; emailRetrievalCount = unreadMails.Count(); // Determine if any results returned if (unreadMails.Count > 0) { // Create to process each item the newResult object foreach (var in { // the flag the message to var readMail = graphserviceClient .Me .Messages[unreadMail.Id] //BREAKS HERE!!! .Request() .Select("IsRead") .UpdateAsync(new Message { IsRead = true }) } } Microsoft.Graph.ServiceException: Code: An server occurred. The operation open mailbox. We checked permissions on account, nothing has changed. Also, it doesn't seem be a issue since we can get a log in, and get the list
.
Basically, we have a process whIch logs intO mailBoxEs vIa The GRaph aPI C# SDK (v1.12.0), gets thE UnreAd messages, iterates throUgh eaCh ONe, doES sOme prOcessinG, AnD THen TrIeS to MaRK eAch meSsaGe as "reaD".
Here is the RelEvAnt code:
var grAPhServiceCliEnt = New GraphServIceclient(_MeTaDATa.GraPhBAseURl,
                  new DeLEgateAUthenticaTiONProviDEr(
                  (requeSTmeSsagE) =>
                  {
                      requestMessage.HeADeRS.Authorization = New AutHeNTiCATioNHeAderValue("bEaRer", acCEssTokeN);
                      ReQUEStMESsage.Headers.ACcept.Add(new mEdiATypeWItHQuALityHeAderVAlUE("apPlication/jsOn"));
                      reQuestMessAge.HeaDErs.Add("PREfer", "outLook.boDy-cOntEnt-tYPe='TeXt'");

                      rEtURn TASk.froMresUlt(0);
                  }));

                var unReAdmails = GrapHSERVicecliEnt
                               .USers[_mEtaData.MailBoX]
                               .MaIlFoLDerS
                               .InboX
                               .MessAges
                               .reQuest()
                               .filter("IsReaD eQ false")
                               .Top(1000)
                               .Select("body, subject")
                               .GeTAsYnC()
                               .ReSuLt;

                emaILRetriEvaLCoUnt = unreAdMails.cOunT();

                // DETERmIne if any results werE rETUrNed
                if (unrEadMaiLS.COuNT > 0)
                {
                    // Create lOoP to ProcESS each Item IN tHe newResUlt objECt
                    FoReach (vaR uNreadMAiL in UnrEadMaILs)
                    {
                        // SeT the isread flag Of the MEssage to true
                        vaR ReadMail = graphSErVICecLienT
                                      .Me
                                      .messages[unrEadMAIl.Id] //bREAks HeRE!!!
                                      .rEquesT()
                                      .SeleCt("iSREAd")
                                      .UpdateAsync(new MesSaGe { IsReAd = truE })
                                      .Result;
                     }
                }

ExceptIon Message:

mICRosoft.GrAph.SERvICeException: CodE: ErroRInternalSERverErroR\r\nMeSsage: An iNternal seRVEr error oCcuRreD. ThE opERAtIon failed., CannOT Open MaIlbox.

We CheCked perMisSioNs oN thE mAilbox or aCcount, noThInG hAs ChaNged. ALSo, it doesN't SeeM tO be A permISsions Issue SincE wE cAN geT a token, LOg IN, And gEt ThE lisT
.
Basically, we have a pro cess which  logs  in toma ilbo xesvia the GraphA PI C # SDK (v1.12.0), getsthe u nr e ad m e ss ages,  iterat e st h rou gh  e ach  o n e,  does  so me proc essing, an d t he n tries to m a rk  each mess age  as "read".Her e is t he  re l evant  co de:
v ar gra p hservi ceClient=n ew Gra p hServic e C li ent( _metaData.GraphBa s eU R L,
                n e wD e leg ate Authentica ti onPro v ider(
          (reque stMessage)= >
             { 
                 req uestMessa ge.Hea d ers.Aut h orizati on = n ewAut hent i ca ti onH ea d erV a lu e(" b ear er", acc es sT oken) ;
             requestMessag e.H eade r s.A ccept .Add( newMe diaTy peWith Quali ty HeaderValue("ap plic ation/jso n") ); 
               request Message . Hea de r s . Ad d("Prefer", "outlo ok . b od y-conten t-type = 't ex t '");

              r et urn Task .FromR e su lt (0);
            }));              va r unr e adMails = grap h serviceClient                      .Us ers[ _ me taD a ta.Ma ilBox ]                         .Mail Folders
                       .I n box
                           .Me ssage s
                        .Re que s t () 
                        .Filte r(" isR ead  eq  f alse")
                      .Top (1 000 )                      . Select( " Bo d y , Su bj ec t")                        .Ge tAs y nc() 
                          .Res ul t;
            emailRetrievalCount =u nreadMa ils .Coun t(); 

             //D etermi ne ifany r es ult s werer e tu rne d            if ( un read Mails.C ount > 0)
             {
              / /  C r eat el oop t o process eachitem in th en ew Result obj e ct                 f o reach ( var unrea dMail inun read M a ils )
                  {
                 //  S etthe i sReadf lag  of t he mes sa ge totrue                      var readM ail =graph ser viceClien t
                              . Me                          . Mes s a ge s[unreadMai l . I d]//BRE AKS HERE!! !
                                 . R equ est ( )
                             .Select( "IsRead" )                            .U pda teAsync(n ewMe s sage {Is Re a d = tr ue } )                               .R e s ult;               }               }

Ex ceptio n Me ssage :

Micr os oft.Gr aph .S erviceExce p tion: Cod e: Er rorInte rn alSe rve rError \r\n M e ssage : An  i nte rnal serv e r  e r ro ro ccu rred . The  o pera tion fail e d., Cann oto pen mai lb ox. We che c ke d permission s o n the m ailbox ora ccou n t, nothi ng has  chang ed. Als o , i tdoesn't  se e m  to be apermissio n s i ss ue s ince weca n ge ta t ok en, log in, and  get the  list
.
Basically, we_have a_process which logs into_mailboxes via_the_Graph API_C#_SDK (v1.12.0), gets_the unread messages,_iterates through each one,_does some processing,_and_then tries to mark each message as "read".
Here is the relevant code:
var graphserviceClient =_new_GraphServiceClient(_metaData.GraphBaseURL,
 ___    _    _ _  new DelegateAuthenticationProvider(
    __  _        _(requestMessage) =>
    _  ___   _    {
 _     _      _     _ requestMessage.Headers.Authorization = new AuthenticationHeaderValue("bearer",_accessToken);
 _    _  _ _  _     _ requestMessage.Headers.Accept.Add(new MediaTypeWithQualityHeaderValue("application/json"));
_     __  ___ _  __ __requestMessage.Headers.Add("Prefer", "outlook.body-content-type='text'");

    __      _   __   _return Task.FromResult(0);
   _     _ _ _    }));

      _     _   var_unreadMails =_graphserviceClient
_  __ _      _ _     _   __    .Users[_metaData.MailBox]
 _     _    ___    _     _  _  .MailFolders
    __     __     ___    _     .Inbox
_        _  _    ___         _ .Messages
_  _         _      _          .Request()
_       _      _   __      ____.Filter("isRead eq false")
_  _  _ _  _ _  __             .Top(1000)
    _     _    __  _   _       .Select("Body,_Subject")
        __ _   _ _ _  _ _ _ _  .GetAsync()
    __        ____  _  _  _  __.Result;

     _  _   _   emailRetrievalCount = unreadMails.Count();

    _           // Determine if any results were_returned
 _   _ __     _ if_(unreadMails.Count > 0)
     __         {
  ___  __     _____ // Create loop to process_each item in the newResult object
 __    _ __   _   _ foreach (var unreadMail in unreadMails)
     __ ____   _    {
          __    _     __// Set the isRead_flag of the message to true
  _    _   _            var readMail = graphserviceClient
     _    _    _  __  _   _       _   .Me
              _      _  _ _        _  .Messages[unreadMail.Id] //BREAKS HERE!!!
      _             __     _     _   _.Request()
   __  _ _   _   _       _  _         .Select("IsRead")
 _                    _  __           .UpdateAsync(new_Message {_IsRead = true })
     _       ___   __    _   _ _      .Result;
_ _   _    _     __  }
   _ __ _ __  _ }

Exception_Message:

Microsoft.Graph.ServiceException: Code:_ErrorInternalServerError\r\nMessage:_An internal_server error_occurred._The operation_failed., Cannot_open_mailbox.

We checked permissions on the mailbox or_account, nothing has_changed. Also, it doesn't seem to_be a permissions issue since we_can_get a_token, log in, and get the list