Skip to content

Commit 24c8ff4

Browse files
Updated post
1 parent 2c70d2e commit 24c8ff4

File tree

1 file changed

+8
-7
lines changed

1 file changed

+8
-7
lines changed

_posts/2022-01-25-Cannot bind argument to parameter-Token-Expiry - Copy.md renamed to _posts/2022-01-25-Cannot bind argument to parameter-Token-Expiry.md

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -26,15 +26,15 @@ You can read my article on how to implement _Certificate Based authentication_ f
2626

2727
As a result of this change I started updating one of our automations, responsible for the whole life-cycle of our mailboxes, to ditch old credential objects in favor of the more secure Certificate Authentication.
2828

29-
This is when I encountered the _‌cannot bind argument to parameter 'token expiry time' because it is null._ error message.
29+
This is when I encountered the _cannot bind argument to parameter 'token expiry time' because it is null._ error message.
3030

3131
## Multiple PowerShell Exchange Sessions
3232

33-
When operating an hybrid environment it is pretty common to open, in the same window/session, a PowerShell connection to both Exchange on-prem and Exchange online.
33+
When operating an hybrid environment it is pretty common to open, in the same window/session, a PowerShell connection to both Exchange on-prem and Exchange Online.
3434

35-
This is required as part of the configuration, usually creation of the mailbox, takes place in on-prem for example via the _New-RemoteMailbox_ cmdlet while other parts of the configuration are performed directly online.
35+
This is required as part of the configuration, usually creation of the mailbox, takes place in on-prem for example via the _New-RemoteMailbox_ cmdlet while other parts of the configuration are performed directly online for example when delegating mailbox permissions.
3636

37-
This morning while debugging my workflow I’ve noticed that while trying to retrieve mailbox information from the on-prem server an exception was being thrown
37+
While debugging my workflow I have noticed that, while trying to retreive mailbox information from the on-prem server, an exception was being thrown
3838

3939
```powershell
4040
# Cmdlet I was running
@@ -44,13 +44,14 @@ Get-RemoteMailbox -Identity $userUpn
4444
Cannot bind argument to parameter 'token expiry time' because it is null.
4545
```
4646

47-
It took me quite a bit to figure this out as no exception during the connection phase was being thrown by either module.
47+
It took me a bit to figure this out as no exception was thrown during the connection *phase* either nor there was any other obvious pointer.
4848

49-
When I was about to give up and open a ticket with Microsoft, which is usually as helpful as freezer in the North Pole, I discovered by chance that opening connection to Exchange Online **first** and **only afterwards** to the Exchange on-prem was working as intended, allowing me to interact with both the Online service and my local Exchange.
49+
When I was about to give up and open a ticket with Microsoft, which is usually as helpful as freezer in the North Pole, I discovered that establishing a connection to Exchange Online followed by a connection to the on-prem server was yielding the desired result. In my workflow I had this the other way around, first local Exchange and then Online service, which was causing the issue.
5050

5151
**Note:** I have experienced/tested this with version 2.0.4 and 2.0.5 of Exchange Online PowerShell module but other versions could be affected as well.
5252
{: .notice--warning}
5353

54-
I did not dig deep into the root cause of the issue but plan to do this tomorrow and already sent my feedback to exocmdletpreview {at} service {fullstop} microsoft {fullstop} com but I doubt I will hear anything from that channel. I plan to open a ticket anyhow to at least have an official statement on this.
54+
I did not dig deep into the root cause of the issue but plan to do this tomorrow and already sent my feedback to exocmdletpreview {at} service {dot} microsoft {dot} com but I doubt I will hear anything from that channel.
55+
I will anyhow open a ticket with support to at least have an official statement/clarification on this.
5556

5657
As soon as I have any news I will update the post until then I hope you can find the information useful.

0 commit comments

Comments
 (0)