You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: _posts/2022-01-25-Cannot bind argument to parameter-Token-Expiry.md
+8-7Lines changed: 8 additions & 7 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -26,15 +26,15 @@ You can read my article on how to implement _Certificate Based authentication_ f
26
26
27
27
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.
28
28
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.
30
30
31
31
## Multiple PowerShell Exchange Sessions
32
32
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.
34
34
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.
36
36
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
Cannot bind argument to parameter 'token expiry time' because it is null.
45
45
```
46
46
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.
48
48
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.
50
50
51
51
**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.
52
52
{: .notice--warning}
53
53
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.
55
56
56
57
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