Get-MgUserCalendarGroup

Christophe Humbert 101 Reputation points
2022-04-22T06:39:28.263+00:00

Hello

I am connecting to graph with the following scope Calendars.read (User.Read.All+ Directory.Read.All) and I am in a delegated use case

I launch the command Get-MgUserCalendarGroup and I got the following error Get-MgUserCalendarGroup_List is not supported

Thanks
Best Regards

Microsoft Graph
Microsoft Graph
A Microsoft programmability model that exposes REST APIs and client libraries to access data on Microsoft 365 services.
11,382 questions
0 comments No comments
{count} votes

Accepted answer
  1. CarlZhao-MSFT 40,221 Reputation points
    2022-04-22T08:06:39.03+00:00

    Hi @Christophe Humbert

    The Get-MgUserCalendarGroup_List is not a valid command, you should use Get-MgUserCalendarGroup -UserId "the id of your logged in user" command.

    Note that since you're in a delegated use case, you can only use the id of the logged in user.

    Connect-MgGraph -Scopes "User.Read.All","Directory.Read.All"   
    Get-MgUserCalendarGroup -UserId "{user id}"   
    

    195439-image.png


    If the answer is helpful, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".
    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.


1 additional answer

Sort by: Most helpful
  1. RajeshKumarMSFT 1,971 Reputation points Microsoft Vendor
    2022-04-22T13:29:17.17+00:00

    Hi @Christophe Humbert ,

    To Launch users calendar group using Power Shell SDK please use this command (Get-MgUserCalendarGroup)

    Please find the below sample code snippet to get users calendar groups.

    • Connect-MgGraph -Scopes "Calendars.Read"
    • Get-Mgusercalendargroup -UserId "UserEmailaddress"

    Refer :-https://learn.microsoft.com/en-us/powershell/module/microsoft.graph.calendar/get-mgusercalendargroup?view=graph-powershell-1.0

    If the answer is helpful, please click "Accept Answer" and kindly upvote it. If you have any further questions about this answer, please click "Comment".