Sign up for Office 365
Learn more about Office 365
I'm using code on http://code.msdn.microsoft.com/office365/Office-365-Manage-users-by-cfc96d5e to connect to Office 365 via c# web application
I'm getting this exception on the Pipeline.Invoke method on the Connect-MsolService cmdlet:
Exception of type 'Microsoft.Online.Administration.Automation.MicrosoftOnlineException' was thrown.
Already done so far:
I can successfully execute connect-msolservice and run cmdlets on the Microsoft Online Services Module for Windows PowerShell on the same machine, using same account.
What else can I try?
Thanks for the feedback.
Have you deployed SSO with Office 365? If so, I suggest you create a non-federated admin user with domain .onmicrosoft.com to test it. Here's a KB article for more information about connecting to MSOL service under SSO environment http://support.microsoft.com/kb/2494043.
I have searched another similar issue with a ASP.NET solution, which has been resolved by changing the Load User Profile to true in the app pool in IIS. You may also try looking for similar settings in your solution.
Meanwhile, I would like to say that there are limited resources for programming issues in this forum, and a lot of great information can be seen in MSDN and TechNet. I recommend you ask this question in MSDN for a better response.
MSDN forum http://social.msdn.microsoft.com/forums/en-us/categories
1 out of 1 people found this post helpful.
Reken, thanks for pointing out to MSDN forums for programming related questions. And BTW - I have tried all recommendations in the KB article support.microsoft.com/.../2494043 without success.
Reken, after posting this question on MSDN forums (social.msdn.microsoft.com/.../3594267d-8956-48ae-9f32-a356a6ac8727) and Stackoverflow (stackoverflow.com/.../exception-of-type-microsoft-online-administration-automation-microsoftonlineexc) and not receiving any useful response - I came back here and actually read what you suggested.
And yes! That's it! This "fix" should be mentioned on that KB article mentioned above: "Change IIS App Pool setting Load User Profile to True" Thanks a lot!!!!