Comments (3)
Hi @derGali,
this can't be answered definitely without the verbose output of the script.
From your description and the partial script output, the most likely is the following:
- Parameter
GraphOnly
is not set, to Set-OutlookSignatures tries to connect to an on-prem Active Directory first. It get's the logged-in user's Distinguised Name with the following command:Add-Type -AssemblyName System.DirectoryServices.AccountManagement; (Get-ItemPropertyValue -Path "HKLM:\SOFTWARE\Microsoft\IdentityStore\Cache\$(([System.Security.Principal.WindowsIdentity]::GetCurrent()).User.Value)\IdentityCache\$(([System.Security.Principal.WindowsIdentity]::GetCurrent()).User.Value)" -Name 'UserName' -ErrorAction SilentlyContinue)
- According to the output, Set-OutlookSignatures then still decides to connect to Graph anyhow. This means that at least one of the following conditions is met:
- The on-prem Active Directory query from step 1 brought no result
- You use New Outlook (this information is missing, as not the whole output is posted in the issue description)
GraphOnly
is set to true (this is not the case here)GraphOnly is set to false AND the Distinguished Name is found in the on-prem Active Directory AND the mailbox is in the cloud AND (
SetCurrentUserOOFMessageAND/OR
SetCurrentUserOutlookWebSignature` is set to true (which is the default value for both parameters)) - this is very likely what happens
- When there is no MSAL.PS Graph token cache file, three authentication attempts towards Graph happen one after the other (verbose output shows details):
- Integrated Windows Authentication
- Silent with a login hint (result from step 1)
- Via Prompt with LoginHint and Timeout
What does the command from step 1 output as result?
Which output is in the verbose log?
from set-outlooksignatures.
The result from step 1 is ... nothing. The query fails. In fact, there is no IndetityCache Key in HKLM:\SOFTWARE\Microsoft\IdentityStore\Cache\S-1-5-21-1409082233-299502267-xxxxxxx-xxxx
I do not use new outlook, GraphOnly is false. In the verbose log I can read the following:
...
AUSFÜHRLICH: Current user:
AUSFÜHRLICH: Authentication
AUSFÜHRLICH: Via IntegratedWindowsAuth
AUSFÜHRLICH: AADSTS50076: Due to a configuration change made by your administrator, or because you moved to a new
location, you must use multi-factor authentication to access '00000003-0000-0000-c000-000000000000'. Trace ID:
8ab7e964-ad0f-4f86-9bcb-583aca7ffc00 Correlation ID: f0e2030f-f33c-41c9-9389-c7c092f43bb6 Timestamp: 2023-11-24
14:17:19Z
AUSFÜHRLICH: Via Silent with LoginHint
AUSFÜHRLICH: No account or login hint was passed to the AcquireTokenSilent call.
AUSFÜHRLICH: Via Prompt with LoginHint and Timeout
...
... actually NOW it works nevertheless and the script gets my correct user right. I really don't know what has happend since last try, I changed nothing, not even the powershell session.
Thank you very much for the quick response, I think from here on I can manage on my own.
from set-outlooksignatures.
You are welcome! Gern geschehen!
from set-outlooksignatures.
Related Issues (20)
- User query LDAP successfully but still get a message about graph and tokens. HOT 4
- Trying to use New outlook but it try to connect to graph when it worked with Old Outlook HOT 2
- V3.6 and Office 2013 : issue with pictures and src value in htm file HOT 2
- v3.6.0 does not find all Outlook mailboxes HOT 5
- Issue reading group membership on local AD HOT 13
- Signatures in Outlook Web (OWA) not working HOT 2
- Wrong version of Word detected HOT 16
- dash is not a valid dash in example script HOT 2
- Mailbox is not member of any allowed group HOT 5
- Can't access local AD HOT 4
- AngleSharp dependency HOT 3
- Getting MSAL token not working on Windows Server 2016 HOT 7
- Outlook Signatures not working in OWA HOT 7
- HTML template variables replacement not working HOT 4
- Get-Process : Es kann kein Prozess mit der Prozess-ID 2716 gefunden werden. HOT 7
- Word not installed or not working correctly. Exit. HOT 3
- Conversion to Base64 is slow, slowing embedding images and loading Graph config file HOT 1
- Possible issue with NewOutlook HOT 5
- Signature not being set for new messages or replies/forwards, and is not displayed under Email Account in Signatures and Stationery HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from set-outlooksignatures.