Replies: 4 comments 2 replies
-
Update - after waiting some time it's now working for the one Bookings page that I specifically gave it Administrator rights to in the UI. That never used to be necessary when I tested these cmdlets a few years ago. A global admin account with Bookings.Manage.All should be able to do these things without contacting an end user to ask to be given permission. I still cannot run get-mgbookingbusiness -BookingBusinessId for any other BookingsBusinessID that my global admin account has not been provided access to. |
Beta Was this translation helpful? Give feedback.
-
Also, yesterday when I was trying to get this to work I saw some responses come back stating my global admin account had no Bookings license. I thought Microsoft fixed that? I definitely read about it being fixed for something. For now, I licensed my Global Admin account for Bookings. I'm no longer seeing license errors, but still running in to permission issues as stated above. |
Beta Was this translation helpful? Give feedback.
-
I just tested Graph Explorer and it works to GET any BookingBusinessId's that I specify. Maybe it's just the PowerShell cmdlets that have issues? |
Beta Was this translation helpful? Give feedback.
-
To support my theory, it looks like the original devblogs post has a comment on it stating the same issue. Surely that was not intended to be working that way at the time the devblogs post was made. |
Beta Was this translation helpful? Give feedback.
-
I've spent a lot of time trying to follow this post in attempt to get more information about our Bookings usage:
https://devblogs.microsoft.com/microsoft365dev/using-scripts-for-microsoft-bookings-calendar-and-mailbox/
The post states to use the following command to gain the necessary permissions:
Connect-MgGraph -Scopes "User.Read.All","Bookings.Manage.All,Calendars.Read.Shared"
Interestingly, the example does not quote the permissions consistently. Other references show quotes around each permission so I tried both ways. I kept getting 403 (Forbidden) back when I tried to run things like:
get-mgbookingbusiness -BookingBusinessId "[email protected]"
According to this page:
https://learn.microsoft.com/en-us/graph/api/bookingbusiness-get?view=graph-rest-1.0
the necessary delegated permissions should be "Bookings.Manage.All, Bookings.ReadWrite.All, BookingsAppointment.ReadWrite.All" so I tried that instead which also did not work. When I try using Graph Explorer it works as expected and I'm authenticating with the same account. For example:
https://graph.microsoft.com/v1.0/solutions/bookingBusinesses?query=MyBookingsID
I then tried to login as the user who owns that Bookings page and give administrative rights to my admin account to see if that had any effect. Now I'm getting back Status: 500 (InternalServerError).
I am able to run this:
get-mgbookingbusiness -all
But I cannot run this for any bookings IDs:
get-mgbookingbusiness -BookingBusinessId "[email protected]"
Beta Was this translation helpful? Give feedback.
All reactions