RunWithElevatedPrivileges In SharePoint Online / Office 365

How bad does it stink that you can’t elevate to the application pool account in Office 365. It used to make things like cross site reads so much easier but from a security perspective totally makes sense it doesn’t exist. There really is no delegated replacement. As a result you are relegated to knowing the actual account name and password, which is annoying, Either way, you can make the process slightly less painless by using the relevant objects within an extension method off a ClientContext object. Here is the extension method: