Error when executing the command "Get-MgTeamChannelMessage"

Mina 15 Reputation points
2023-06-27T11:25:42.4233333+00:00

The following error occurs when executing the command "Get-MgTeamChannelMessage".

I cannot assign the "ChannelMessage.Read.All" authority due to the restrictions of the organization I belong to. Please let us know how to deal with this case.

Get-MgTeamChannelMessage : Missing scope permissions on the request. API requires one of 'ChannelMessage.Read.All'. ScoAPI requires one of 'ChannelMessage.Read.All'.

User's image

Microsoft Security | Microsoft Graph
{count} votes

4 answers

Sort by: Most helpful
  1. Vasil Michev 119.5K Reputation points MVP Volunteer Moderator
    2023-06-27T17:25:27.1733333+00:00

    The only thing you can do here is add the permissions, or request your admins to do so.


  2. Konstantinos Passadis 19,586 Reputation points MVP
    2023-07-03T23:43:07.12+00:00

    Hello @Mina !

    Welcome to Microsoft QnA!

    As @Vasil Michev already explained , you need an Administrator to add this Permission for you to be able to run the Command

    User's image

    I hope this helps!

    Kindly mark the answer as Accepted and Upvote in case it helped!

    Regards


  3. Konstantinos Passadis 19,586 Reputation points MVP
    2023-07-04T07:03:43.76+00:00

    Hello @Mina !

    You can probably use the Microsoft Teams Powershell Module

    https://learn.microsoft.com/en-us/microsoftteams/teams-powershell-install

    https://learn.microsoft.com/en-us/powershell/module/teams/?view=teams-ps

    But i am not sure whether you can achieve the same command as it is more of an Administrative Tool

    also you can try : Connect-MgGraph -Scopes "ChannelMessage.Read.All"

    See if this allows you to read your team messages

    I hope this helps!

    Kindly mark the answer as Accepted and Upvote in case it helped!

    Regards


  4. Konstantinos Passadis 19,586 Reputation points MVP
    2023-07-06T22:42:35.5333333+00:00

    Hello @Mina !

    Yes , exactly

    I researched the whole issue , cannot find any other way to achieve that....

    Talk to the Admin to provide Delegated Permissions for ChannelMessage.Read.All

    In the meantime here are the instructions for the Filtering you mentioned earlier

    https://learn.microsoft.com/en-us/graph/filter-query-parameter?tabs=powershell

    I hope this helps!

    Kindly mark the answer as Accepted and Upvote in case it helped!

    Regards


Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.