[GH-ISSUE #104] Trying to use New outlook but it try to connect to graph when it worked with Old Outlook #41

Closed
opened 2026-02-27 20:30:57 +03:00 by kerem · 2 comments
Owner

Originally created by @fpsacha on GitHub (Mar 21, 2024).
Original GitHub issue: https://github.com/Set-OutlookSignatures/Set-OutlookSignatures/issues/104

Using Powershell 5
"Powershell 7 64 bits does not find NewOutlook"

My account is not a remote mailbox.
My command does not have the -GraphOnly true
The registry UseNewOutlook is set to 1 in Computer\HKEY_CURRENT_USER\SOFTWARE\Microsoft\Office\16.0\Outlook\Preferences

If i run the script using PS 5 or 7, with Old Outlook. It works, i have the signature and everything.
If i run the script using PS 5 with the New outlook, it finds the version of the new outlook "Version: 1.2024.313.100"
LDAP and QC Query are successful but then it tries to connect to Graph. Do we have to use Graph to use the New outlook or can we do it locally ?

Error i have :Unexpected error. Exit.
New-MsalClientApplication : Cannot bind argument to parameter 'ClientId' because it is an empty string.
Obviously because my graph is not setup because i do not want to use it.

Originally created by @fpsacha on GitHub (Mar 21, 2024). Original GitHub issue: https://github.com/Set-OutlookSignatures/Set-OutlookSignatures/issues/104 Using Powershell 5 "Powershell 7 64 bits does not find NewOutlook" My account is not a remote mailbox. My command does not have the -GraphOnly true The registry UseNewOutlook is set to 1 in `Computer\HKEY_CURRENT_USER\SOFTWARE\Microsoft\Office\16.0\Outlook\Preferences` If i run the script using PS 5 or 7, with Old Outlook. It works, i have the signature and everything. If i run the script using PS 5 with the New outlook, it finds the version of the new outlook "Version: 1.2024.313.100" LDAP and QC Query are successful but then it tries to connect to Graph. Do we have to use Graph to use the New outlook or can we do it locally ? Error i have :Unexpected error. Exit. New-MsalClientApplication : Cannot bind argument to parameter 'ClientId' because it is an empty string. Obviously because my graph is not setup because i do not want to use it.
kerem closed this issue 2026-02-27 20:30:57 +03:00
Author
Owner

@GruberMarkus commented on GitHub (Mar 21, 2024):

Hi Sasha,

to my knowledge, New Outlook currently does not work with Exchange mailboxes held on-prem, only with Exchange mailboxes held in Exchange Online. That's why a connection to Graph is required.

This blog article from the Microsoft Outlook team still seems to be valid: https://techcommunity.microsoft.com/t5/outlook-blog/the-new-outlook-for-windows-for-organization-admins/ba-p/3929169 ("Support for Exchange on-prem": "Investigating")

Also, New Outlook does not store signatures locally, but in the Exchange mailbox as a "roaming signature". And that also is only supported in Exchange Online.

The error is because you modified the default value of $GraphClientId in default graph config.ps1, and set it to a non supported value.

If you want to avoid a connection to Microsoft Graph, all of the following settings must be configured:

  • Option A
    • Only run Set-OutlookSignature when an on-prem Active Directory can be reached
    • Do not set GraphOnly to true
    • The mailbox of the logged-in user must be held on-prem, not in Exchange Online
    • Do not use New Outlook (does not work with Exchange mailboxes on-prem anyhow) - Outlook and Outlook Web are possible
  • Option B
    • Only run Set-OutlookSignature when an on-prem Active Directory can be reached
    • Do not set GraphOnly to true
    • The mailbox of the logged-in user is in Exchange Online, but all required attributes (see README file) are synchronized to on-prem
    • Do not set OOF message
    • Do not set Outlook Web signature
    • Do not use New Outlook - Outlook is a must

The PowerShell code in Set-OutlookSignatures looks like this:

if (
    ($GraphOnly -eq $true) -or
    (($GraphOnly -eq $false) -and ($ADPropsCurrentUser.msexchrecipienttypedetails -ge 2147483648) -and (($SetCurrentUserOOFMessage -eq $true) -or ($SetCurrentUserOutlookWebSignature -eq $true))) -or
    (($GraphOnly -eq $false) -and ($null -eq $ADPropsCurrentUser)) -or
    ($OutlookUseNewOutlook -eq $true)
) {
    # Connect to Graph
}

Please let me know if this answers your questions.

<!-- gh-comment-id:2013166333 --> @GruberMarkus commented on GitHub (Mar 21, 2024): Hi Sasha, to my knowledge, New Outlook currently does not work with Exchange mailboxes held on-prem, only with Exchange mailboxes held in Exchange Online. That's why a connection to Graph is required. This blog article from the Microsoft Outlook team still seems to be valid: https://techcommunity.microsoft.com/t5/outlook-blog/the-new-outlook-for-windows-for-organization-admins/ba-p/3929169 ("Support for Exchange on-prem": "Investigating") Also, New Outlook does not store signatures locally, but in the Exchange mailbox as a "roaming signature". And that also is only supported in Exchange Online. The error is because you modified the default value of `$GraphClientId` in `default graph config.ps1`, and set it to a non supported value. If you want to avoid a connection to Microsoft Graph, all of the following settings must be configured: - Option A - Only run Set-OutlookSignature when an on-prem Active Directory can be reached - Do not set `GraphOnly` to `true` - The mailbox of the logged-in user must be held on-prem, not in Exchange Online - Do not use New Outlook (does not work with Exchange mailboxes on-prem anyhow) - Outlook and Outlook Web are possible - Option B - Only run Set-OutlookSignature when an on-prem Active Directory can be reached - Do not set `GraphOnly` to `true` - The mailbox of the logged-in user is in Exchange Online, but all required attributes (see README file) are synchronized to on-prem - Do not set OOF message - Do not set Outlook Web signature - Do not use New Outlook - Outlook is a must The PowerShell code in Set-OutlookSignatures looks like this: ``` if ( ($GraphOnly -eq $true) -or (($GraphOnly -eq $false) -and ($ADPropsCurrentUser.msexchrecipienttypedetails -ge 2147483648) -and (($SetCurrentUserOOFMessage -eq $true) -or ($SetCurrentUserOutlookWebSignature -eq $true))) -or (($GraphOnly -eq $false) -and ($null -eq $ADPropsCurrentUser)) -or ($OutlookUseNewOutlook -eq $true) ) { # Connect to Graph } ``` Please let me know if this answers your questions.
Author
Owner

@fpsacha commented on GitHub (Mar 21, 2024):

Thanks for the info !
i was trying to do Option B but with New Outlook.
i will Work on an Enterprise Apps then.

<!-- gh-comment-id:2013224479 --> @fpsacha commented on GitHub (Mar 21, 2024): Thanks for the info ! i was trying to do Option B but with New Outlook. i will Work on an Enterprise Apps then.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/Set-OutlookSignatures-Set-OutlookSignatures#41
No description provided.