OfficeDev / ews-managed-api

Other
585 stars 321 forks source link

ExchangeService.GetRoomLists(): "Mailbox '<guid>' doesn't have a valid license." #279

Open Vineet-Yadav opened 2 years ago

Vineet-Yadav commented 2 years ago

We validate the user on Azure AD and found this have valid license (Office 365 E5 Developer). We are using OAuth grant flow. While fetching data from Exchange using Exchange service, ExchangeService.GetRoomLists() is returning error as "Mailbox '' doesn't have a valid license."

Detail message: Error Message:An internal server error occurred. The operation failed., Mailbox '' doesn't have a valid license. Stack Trace: at Microsoft.Exchange.WebServices.Data.ServiceResponse.InternalThrowIfNecessary() at Microsoft.Exchange.WebServices.Data.GetRoomListsRequest.Execute() at Microsoft.Exchange.WebServices.Data.ExchangeService.GetRoomLists()

Here ExchangeService is Microsoft.Exchange.WebServices.Data.ExchangeService.

Please suggest the missing part?