{"id":1022,"date":"2010-10-11T14:56:41","date_gmt":"2010-10-11T14:56:41","guid":{"rendered":"https:\/\/www.wapshere.com\/missmiis\/?p=1022"},"modified":"2010-10-11T15:41:45","modified_gmt":"2010-10-11T15:41:45","slug":"troubleshooting-connection-problems-with-the-bpos-cmdlets","status":"publish","type":"post","link":"https:\/\/www.wapshere.com\/missmiis\/troubleshooting-connection-problems-with-the-bpos-cmdlets","title":{"rendered":"Troubleshooting connection problems with the BPOS cmdlets"},"content":{"rendered":"<p>This one drove me crazy for a good while: I had been running the BPOS cmdlets just fine using my own account (and here I mean my <em>local domain<\/em> account, not the BPOS account) but when I switched to using a different account the BPOS cmdlets would not work.<\/p>\n<p>Essentially I was running a bunch of scripts and scheduled tasks using my own account, and I wanted to move them to use a proper service account. Note in both cases I was using the <em>same BPOS account<\/em> as the credential for the cmdlets.<\/p>\n<p><!--more--><\/p>\n<p>The first error I got was this:<\/p>\n<p><code>Get-MSOnlineUser : Object reference not set to an instance of an object.<\/code><\/p>\n<p>After getting no help whatsoever from the BPOS service desk I found part of the solution <a href=\"http:\/\/www.messageops.com\/object-reference-not-set-to-an-instance-of-an-object-when-running-powershell-command\">here<\/a>. As I had created a new service account to run these scripts it certainly hadn&#8217;t occurred to me to login to the server with the new account and run IE, just so it would have an IE profile. I never would have thought of this myself, so thanks Joseph!<\/p>\n<p>However I wasn&#8217;t there yet as I now had a new error:<\/p>\n<p><code>Get-MSOnlineUser : Credentials are not valid. Check the user name and password and try again.<\/code><\/p>\n<p>Predictably the BPOS service desk took the obvious route on this:<\/p>\n<p>SD: Your BPOS credentials are wrong.<br \/>\nMe: No they&#8217;re not &#8211; I use <em>exactly the same BPOS credentials<\/em> with my own account and it works.<br \/>\nSD: Can you check the BPOS account is not locked out.<br \/>\nMe: It&#8217;s not locked out &#8211; it works perfectly from my other local account!!<br \/>\nSD: &#8230;. Your BPOS credentials are wrong.<\/p>\n<p>However, despite my irritation with the BPOS service desk, it was a friendly local\u00c2\u00a0Microsoft consultant who eventually steered me right. The problem was that, after creating the IE profile for the service account, I had not also gone into the IE settings and set the proxy correctly. So in fact this was a failure to connect and not a credential problem at all!<\/p>\n<p>His great advice was to try and access these URLs while logged in as the problem account:<\/p>\n<p><a href=\"https:\/\/locationservice.microsoftonline.com\/\">https:\/\/locationservice.microsoftonline.com<\/a><\/p>\n<p><a href=\"https:\/\/provisioning.emea.microsoftonline.com\/\">https:\/\/provisioning.emea.microsoftonline.com<\/a>\u00c2\u00a0(note this is an EMEA address so will differ for other regions)<\/p>\n<p>Using my own account the first URL showed a page, and the second popped up a login box. With the problem account I failed to access either address, until I got those proxy settings right.<\/p>\n<p>The BPOS cmdlets are now working for the new user account.<\/p>\n<h3>In summary<\/h3>\n<p>To run the BPOS cmdlets you need an IE profile and you need to be able to access your regional version of the two msonline addresses linked above.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>This one drove me crazy for a good while: I had been running the BPOS cmdlets just fine using my own account (and here I mean my local domain account, not the BPOS account) but when I switched to using a different account the BPOS cmdlets would not work. Essentially I was running a bunch&#8230;<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"jetpack_post_was_ever_published":false,"footnotes":"","jetpack_publicize_message":"","jetpack_is_tweetstorm":false,"jetpack_publicize_feature_enabled":true,"jetpack_social_post_already_shared":false,"jetpack_social_options":[]},"categories":[47,23],"tags":[],"class_list":["post-1022","post","type-post","status-publish","format-standard","hentry","category-bpos","category-powershell"],"jetpack_publicize_connections":[],"jetpack_featured_media_url":"","jetpack_shortlink":"https:\/\/wp.me\/pkp1o-gu","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/www.wapshere.com\/missmiis\/wp-json\/wp\/v2\/posts\/1022","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.wapshere.com\/missmiis\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.wapshere.com\/missmiis\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.wapshere.com\/missmiis\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.wapshere.com\/missmiis\/wp-json\/wp\/v2\/comments?post=1022"}],"version-history":[{"count":7,"href":"https:\/\/www.wapshere.com\/missmiis\/wp-json\/wp\/v2\/posts\/1022\/revisions"}],"predecessor-version":[{"id":1030,"href":"https:\/\/www.wapshere.com\/missmiis\/wp-json\/wp\/v2\/posts\/1022\/revisions\/1030"}],"wp:attachment":[{"href":"https:\/\/www.wapshere.com\/missmiis\/wp-json\/wp\/v2\/media?parent=1022"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.wapshere.com\/missmiis\/wp-json\/wp\/v2\/categories?post=1022"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.wapshere.com\/missmiis\/wp-json\/wp\/v2\/tags?post=1022"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}