Forum Discussion
SeanS
Feb 22, 2022Copper Contributor
Mark All Messages As Read
I noticed that some members of my teams have a lot of bold text on their screen indicating unread messages. We are all busy and sometimes we lose track of things and unread messages build up. Users t...
SanthoshB1
Feb 15, 2023Bronze Contributor
m_g_danish Here is the PowerShell script to mark your chats as read in a click!
RickKastenLM
Mar 08, 2023Copper Contributor
SanthoshB1 This script requires an admin account to Teams
- SanthoshB1Mar 13, 2023Bronze Contributor
RickKastenLM This script uses Connect-MgGraph -Scopes "Chat.ReadWrite" ,"User.Read". These scopes does not require admin consent (see screenshots below). Please check with your admin in case it is blocked in your tenant.
- GunjanTyagiMar 29, 2023Copper Contributor
SanthoshB1
can you please help with the error, I am providing the actual user UPN in the userUPN parameter as instructed in the script, while executing the script given in the link you shared it says:
Invoke-MgMarkChatReadForUser : Id of the user must be specified
At line:33 char:13
+ Invoke-MgMarkChatReadForUser -ChatId $chat.Id -BodyParame ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : InvalidOperation: ({ ChatId = 19:a...onJsonSchema1 }:<>f__AnonymousType0`2) [Invoke-MgMarkChatReadForUser_Mark], RestException`1
+ FullyQualifiedErrorId : BadRequest,Microsoft.Graph.PowerShell.Cmdlets.InvokeMgMarkChatReadForUser_Mark
Invoke-MgMarkChatReadForUser : Id of the user must be specified
At line:33 char:13
+ Invoke-MgMarkChatReadForUser -ChatId $chat.Id -BodyParame ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : InvalidOperation: ({ ChatId = 19:7...onJsonSchema1 }:<>f__AnonymousType0`2) [Invoke-MgMarkChatReadForUser_Mark], RestException`1
+ FullyQualifiedErrorId : BadRequest,Microsoft.Graph.PowerShell.Cmdlets.InvokeMgMarkChatReadForUser_Mark- SanthoshB1Jul 03, 2023Bronze Contributor
GunjanTyagi Hi, I have checked the script and it works fine. Please ensure you the script needs to be run by the user whose chats need to be marked as read. It can't be used to mark the chats as read for other users.
- m_g_danishMar 16, 2023Copper ContributorSadly—although with very good reason—my organization doesn't give users the domain/local admin rights necessary to install the MS Graph PS module. I wish I could get this to work! Seems like it would be a much more efficient solution than a keyboard macro.