Sharepoint 365 CSOM error. Receive "Root element is missing." ExecuteQuery failed in C #

This is part of a Visual Studio 2017 application developed on a Windows 10 box. Here is my code. I've tried different configurations, but the result remains the same. I'm not sure where to go from here.

The real error is triggered when the cnx.ExecuteQuery () Line is running. The user name and password are extracted from the configuration file without errors.

        private string SaveFile(string fileName, byte() fileContent)
            string retVal = string.Empty;
                string spSiteUrl = "";
                string username = Convert.ToString(ConfigurationManager.AppSettings("KeyUserName"));
                string password = Convert.ToString(ConfigurationManager.AppSettings("KeyPassword"));
                using (ClientContext cnx = new ClientContext(spSiteUrl))

                    SecureString secret = new SecureString();
                    foreach (char c in password)
                    cnx.Credentials = new SharePointOnlineCredentials(username, secret);
                    Web w = cnx.Web;
                    cnx.Load(w, website => website.Lists, website => website.ServerRelativeUrl);

                    retVal = "Success";
            catch (Exception ex)
                MessageBox.Show(ex.Message + Environment.NewLine + ex.InnerException);
            return retVal;

Release $ 10, earn $ 0.08 daily for 365 days, min. Only $ 0.5 – HYIPs

The TopGold Forum quickly becomes the most important online financial goal on the Internet.

We are an authority and a first class forum for professional investors, forex traders, affiliates and individuals who want to make a living online or just want to make more money.

If this is your first visit, be sure to read the FAQ by clicking the link above. You must register before you can post: click the register link above to continue.

sharepoint online – Add a new internal user to Office 365 who is considered an external user

We recently added a new team member to our organization with our domain name (@ourcompanyname). I gave him the Office 365 E3 license. When I try to add it to a SharePoint group on a random website, I am told that this is not possible. Add it until I change my external sharing policy (these are only members of the organization).

I can not understand what is happening! The user is in my organization!

Thanks a lot

Active Directory – How can I integrate users from two different Office 365 accounts into a team instance?

Our company has approximately half of our users in an Office 365 account and all in the domain (e.g. and the other half in a completely separate Office 365 account,

We want to use MS Teams and need a way to "link" these two accounts. I am aware that it is possible to invite users as "guests" from one to the other, but this would be painful and there are serious limitations.

(It is also worth noting that it is NOT really practical for us to combine the two Office 365 accounts into one that hosts both domains. Of course this would be the easiest solution, but it is not feasible.)

Is it possible to get the Active Directory servers to collaborate for each account so that we can present a single, unified MS Teams environment with all features to all users?

Authentication – Office 365 client denies access to documents in SharePoint 2016

We are currently in the process of migrating our users from Office 2016/2019 clients to the new Office 365 Client Suite in order to prepare them for Microsoft 365.
Some of our users (but not all!) Are now having trouble trying to access documents stored in our on-premises SharePoint 2016 environment.
When opening a Word / Excel file in your Office application, you receive the following message:
"Cannot open"
Office errors
One strange thing I noticed is that it ALWAYS works when I try to debug it in Fiddler and Fiddler authenticates with our SharePoint.
After doing some registry searching, I found that it works exactly once after deleting the key with the URL of our SharePoint web application in HKEY_CURRENT_USER Software Microsoft Office 16.0 Common Identity ServiceAuthInfoCache CredStoreKeyToAuthScheme
Office just re-creates the key and stops working until I delete it.

Any advice on how to find the cause would be greatly appreciated.

Email – Create predefined responses in the Outlook 365 web client

I am using Outlook 365 with the web client from my Ubuntu computer. I want to create a predefined answer that I can use to quickly answer standard questions. I found this tutorial but apparently it doesn't fit the Outlook web client because of the client.

Is there any way to get a similar result in the Outlook web client?

Microsoft Office 365 – PowerShell copies a user's license to another user

I have to activate a lot of users for "A5 for Faculty", but only the "Microsoft 365 Audio Conferencing" function.

I went to a user and manually activated that. Works, no problem. When I look at their license with MSOL, it looks like this:

(Get-MsolUser -UserPrincipalName '').Licenses(0).ServiceStatus

ServicePlan               ProvisioningStatus 
-----------               ------------------ 
RECORDS_MANAGEMENT        Disabled           
INFO_GOVERNANCE           Disabled           
DATA_INVESTIGATIONS       Disabled           
CUSTOMER_KEY              Disabled           
COMMUNICATIONS_DLP        Disabled           
M365_ADVANCED_AUDITING    Disabled           
MIP_S_CLP1                Disabled           
MIP_S_CLP2                Disabled           
EducationAnalyticsP1      Disabled           
INFORMATION_BARRIERS      Disabled           
KAIZALA_STANDALONE        Disabled           
MICROSOFT_SEARCH          PendingProvisioning
PREMIUM_ENCRYPTION        Disabled           
WHITEBOARD_PLAN3          Disabled           
PAM_ENTERPRISE            Disabled           
MICROSOFTBOOKINGS         Disabled           
BPOS_S_TODO_3             Disabled           
AAD_BASIC_EDU             Disabled           
SCHOOL_DATA_SYNC_P2       Disabled           
STREAM_O365_E5            Disabled           
THREAT_INTELLIGENCE       Disabled           
TEAMS1                    Disabled           
Deskless                  Disabled           
FLOW_O365_P3              Disabled           
POWERAPPS_O365_P3         Disabled           
ADALLOM_S_O365            Disabled           
OFFICE_FORMS_PLAN_3       Disabled           
EXCHANGE_ANALYTICS        Disabled           
LOCKBOX_ENTERPRISE        Disabled           
EQUIVIO_ANALYTICS         Disabled           
PROJECTWORKMANAGEMENT     Disabled           
MCOEV                     Disabled           
MCOMEETADV                Success            
SWAY                      Disabled           
ATP_ENTERPRISE            PendingProvisioning
BI_AZURE_P2               Disabled           
INTUNE_O365               PendingActivation  
RMS_S_ENTERPRISE          Disabled           
YAMMER_EDU                Disabled           
SHAREPOINTWAC_EDU         Disabled           
OFFICESUBSCRIPTION        Disabled           
MCOSTANDARD               Disabled           

Ok, I tell myself, I'm a pretty smart guy, it should be easy. I need to create the license option object as follows:

$FU=((Get-MsolAccountSku | Where-Object {$_.SkuPartNumber -eq  'ENTERPRISEPREMIUM_FACULTY' }).ServiceStatus | Select-Object ServicePlan -ExpandProperty ServicePlan).ServiceName  
foreach ($PLAN in $FU) { 
   if ($ENABLED -notcontains $PLAN)  { $DISABLED += $PLAN} 

$ONLY_MCOMEETADV = New-MsolLicenseOptions -AccountSkuId "prefix:ENTERPRISEPREMIUM_FACULTY" -DisabledPlans ($DISABLED -join ',')   

Set-MsolUserLicense -UserPrincipalName -AddLicenses "prefix:ENTERPRISEPREMIUM_FACULTY" -LicenseOptions $ONLY_MCOMEETADV -verbose 

It always returns:
Set-MsolUserLicense: This license cannot be assigned because the license options are invalid.

I got on the $ ENABLED list by looking at everything that is not explicitly disabled. There's obviously something else that needs to be activated, but I can't find out for my whole life. Does anyone know Microsoft Licensing well enough to guess?