Get-MgUserCalendarView : The specified object was not found in the store.

tk_kop 60 Reputation points
2024-09-30T07:34:16.21+00:00

When I executed the Get-MgUserCalendarView command, the following error occurred. Could this be because the user executing the command does not have permission to view the calendar? Please advise.

The scope is as follows:

  • Connect-MgGraph -Scopes "Calendars.Read"

Get-MgUserCalendarView : The specified object was not found in the store.

Microsoft Security | Microsoft Graph
0 comments No comments
{count} votes

Accepted answer
  1. Hitesh Pachipulusu - MSFT 3,620 Reputation points Microsoft External Staff
    2024-09-30T09:09:55.37+00:00

    Hello,

    Thank you for reaching out to Microsoft Support!

    Yes, the error you’re encountering with the Get-MgUserCalendarView command could indeed be due to insufficient permissions. Here are a few things to check:

    1. Permissions: Ensure that the user executing the command has the necessary permissions. The Calendars.Read scope allows read access to the user’s calendar, but if you’re trying to access a shared or resource calendar, you might need Calendars.Read.Shared. Users Calendar should be shared with signed-in user.
    2. User ID and Calendar ID: Verify that the UserId and CalendarId parameters are correct. The error “The specified object was not found in the store” often indicates that the specified calendar or user does not exist or is not accessible with the provided credentials.
    3. Date and Time Range: Ensure that the StartDateTime and EndDateTime parameters are correctly formatted and within a valid range.

    Hope this helps.

    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.


1 additional answer

Sort by: Most helpful
  1. Anonymous
    2024-09-30T08:32:49.19+00:00

    Hi @tk_kop

    Try adding the Calendars.Read.Shared permission when connecting to the Graph API, as follows:

    Connect-MgGraph -Scopes Calendars.Read.Shared
    

    Hope this helps.

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

    1 person found this answer helpful.
    0 comments No comments

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.