mirror of
https://github.com/Set-OutlookSignatures/Set-OutlookSignatures.git
synced 2026-04-26 10:45:52 +03:00
[GH-ISSUE #78] Issue reading group membership on local AD #22
Labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/Set-OutlookSignatures-Set-OutlookSignatures#22
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @Brosian on GitHub (May 25, 2023).
Original GitHub issue: https://github.com/Set-OutlookSignatures/Set-OutlookSignatures/issues/78
Originally assigned to: @Brosian on GitHub.
Hi again,
I'm having issues with retrieving group membership of the logged on user.
"Get AD properties of each mailbox @2023-05-25T15:20:35+02:00@
Mailbox 'user.name'
Search for mailbox user object in domain/forest 'domain.com': Not found
Mailbox 'user.name'
Mailbox user object already searched before, using cached data"
...
Group: Mailbox is not member of any allowed group"
log.txt
Best regards,
Peter
@GruberMarkus commented on GitHub (May 25, 2023):
Hi Peter,
Do you still have an Exchange Server on-prem, or did you start your Exchange journey right in the cloud?
I will need the full unchanged log. Let me know your Github mail address and I will send you a secured upload link.
In the mean time, please test if it works when using the
-GraphOnly trueparameter. If it works, it is very likely that the root cause is the sync between Azure AD and local AD.See chapter
14.1 Basic ConfigurationinReadmefor the easy registration of the Set-OutlookSignatures App in your tenant.@Brosian commented on GitHub (May 25, 2023):
Hi Markus,
We don't have Exchange Server on-prem anymore. I'm confident it started out as on-prem then migrated to 365 before my time at the company.
Parameter -GraphOnly $true takes me to page with message:
"needs permission to access resources in your organisation that only an admin can grant. Please ask an admin to grant permission to this app before you can use it."
I haven't used graph before and will need to look more into that later. Was hoping that I could retrieve the local security groups for the user from AD and deploy signatures based on that membership. Similar to: (New-Object System.DirectoryServices.DirectorySearcher("(&(objectCategory=User)(samAccountName=$($env:username)))")).FindOne().GetDirectoryEntry().memberOf
You can send link to dummy@bruise.se
Best regards,
Peter
@GruberMarkus commented on GitHub (May 25, 2023):
Set-OutlookSignatures absolutely can retrieve local security groups and assign templates/signatures based on group membership.
This is a very straight forward and typical usecase - but it requires a correct setup in hybrid environments.
You will receive a secure upload link in a few minutes.
Please make sure you read chapter 14.1 Basic Configuration in Readme - setting up Azure AD literally does not take more than a few minutes and a handful of clicks:
Set-OutlookSignatures.ps1 -GraphOnly trueThe easiest way is to once start Set-OutlookSignatures with a cloud administrator. The administrator then gets asked for admin consent for the correct permissions.
@GruberMarkus commented on GitHub (May 25, 2023):
When uploading logs, please make sure that you have used the
-verboseparameter for running Set-OutlookSignatures. This verbose output can be very helpful for debugging.@GruberMarkus commented on GitHub (May 26, 2023):
Hi Peter,
I received two log files.
'log2.txt' is not complete, because you have not followed the authentication process (a browser window pops up at first execution to obtain an OAuth-Token). The script output to follow is:
The file 'log1.txt' gives some more hints. The problem is:
Please check is the user for this mailbox in your local (on-prem) Active Directory has the following attributes, and which values are defined for them: mail, legacyExchangeDN, msExchRecipientTypeDetails, msExchMailboxGuid and proxyAddresses
My guess is that some of these attributes do not have values, because they are not or no longer synced with Azure AD.
Please let me know when you upload new files, as I do not get informed about new uploads.
@Brosian commented on GitHub (May 26, 2023):
I've tried to authenticate with my admin account in the browser but get message "Need admin approval", maybe I need global admin or more permissions?
Only attributes that have values for the account is "mail" and "proxyAddresses"
@GruberMarkus commented on GitHub (May 26, 2023):
If you got the message "need admin approval", you have not followed the steps from comment 4:
The other thing is about your local AD attributes: As not all the attributes defining a mailbox are set on-prem, Set-OutlookSignature can not find a mailbox in your on-prem AD. You have two options:
-GraphOnly trueparameter.For option B, you need to configure or register an application in your Azure AD. Both possible scenarios, the easy registration and the advanced configuration, are described in the README file: Chapter 14, "Hybrid and cloud-only support". The easy registration scenario, which is the fastest and least error prone way, is outlined above for your convenience.
Please let me know if you find an error in the description. Should you be looking for professional implementation support, just get in touch with me and we'll go through the commercial options by video conference.
@Brosian commented on GitHub (May 26, 2023):
I did try to logon with admin account on a machine that has admin permissions in the 365 tenant and still got the same message "Need admin approval". I probably need elevated permissions in 365 and will contact our global IT next week.
Thank you for your patience and support. Have a great weekend!
@GruberMarkus commented on GitHub (Jun 2, 2023):
Hi @Brosian,
do you have any news regarding this issue, maybe feedback from your global IT?
Kind regards
Markus
@Brosian commented on GitHub (Jun 2, 2023):
Hi Markus, no progress in this matter unfortunately. I will work with a colleague that has elevated permissions next week.
You can close this case if you want to.
@GruberMarkus commented on GitHub (Jun 2, 2023):
Please keep me updated. Documenting your experience will help other users facing the same problem in the future.
I will close this issue if I don't hear from you until the 11th of June.
Have a great weekend!
@GruberMarkus commented on GitHub (Jun 14, 2023):
Hi @Brosian,
do you have any news on this issue, or should I close it due to inactivity?
@Brosian commented on GitHub (Jun 18, 2023):
Hi @GruberMarkus
I won't be able to give you an update until late Aug so please close this thread.
Thank you for your engagement in the issue.