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
+12-13Lines changed: 12 additions & 13 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -18,23 +18,23 @@ header:
18
18
19
19
## Exchange Online Certificate Based authentication
20
20
21
-
Microsoft is, *finally*, disabling **basic authentication** (read username and password) in Exchange Online in favour of **Certificate Based authentication**.
21
+
Microsoft is, _finally_, disabling **basic authentication** (read username and password) in Exchange Online in favour of **Certificate Based authentication**.
22
22
23
-
Once this change is fully implemented, around mid February at least for some tenants, connecting via username and passwords to Exchange Online will not be possible anymore.
23
+
Once this change is fully implemented, around mid February at least for some tenants, connecting via username and passwords to Exchange Online will not be possible anymore.
24
24
25
-
You can read my article on how to implement *Certificate Based authentication* for Exchange Online [here](https://pscustomobject.github.io/powershell/office365/exchange/Exchange-Online-Certificate-Based-Authentication/).
25
+
You can read my article on how to implement _Certificate Based authentication_ for Exchange Online [here](https://pscustomobject.github.io/powershell/office365/exchange/Exchange-Online-Certificate-Based-Authentication/).
26
26
27
-
As a result of this change I started updating one of our automations, responsible for the whole lifecycle of our mailboxes, to ditch old credential objects in favour of the more secure Certificate Authentication.
27
+
As a result of this change I started updating one of our automations, responsible for the whole lifecycle of our mailboxes, to ditch old credential objects in favour 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.
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
+
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
38
38
39
39
```powershell
40
40
# Cmdlet I was running
@@ -46,12 +46,11 @@ Cannot bind argument to parameter 'token expiry time' because it is null.
46
46
47
47
It took me quite a bit to figure this out as no exception during the connection phase was being thrown by either module.
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.
50
-
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.
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
-
{: .notice—warning}
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 {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.
55
55
56
56
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