Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

IS it possible to export Resource mailboxes as well? #10

Open
nfrederickx opened this issue Mar 8, 2021 · 8 comments
Open

IS it possible to export Resource mailboxes as well? #10

nfrederickx opened this issue Mar 8, 2021 · 8 comments

Comments

@nfrederickx
Copy link

nfrederickx commented Mar 8, 2021

This script works well on regular mailboxes.
When I try it on resource mailboxes I get this error:

Export-GCECalendar : StatusCode: 404, ReasonPhrase: 'Not Found', Version: 1.1, Content: System.Net.Http.StreamContent, Headers:
{
Transfer-Encoding: chunked
Strict-Transport-Security: max-age=31536000
request-id: 6eb9321d-50b3-47fd-b72e-d035552b1fb7
client-request-id: 6eb9321d-50b3-47fd-b72e-d035552b1fb7
x-ms-ags-diagnostic: {"ServerInfo":{"DataCenter":"North Europe","Slice":"E","Ring":"4","ScaleUnit":"004","RoleInstance":"DB1PEPF00005B5C"}}
Cache-Control: private
Date: Mon, 08 Mar 2021 10:58:12 GMT
Content-Type: application/json; odata.metadata=minimal; odata.streaming=true; IEEE754Compatible=false; charset=utf-8
}
At line:60 char:19

  • ... $Events = Export-GCECalendar -MailboxName $MailboxName -ClientId $C ...
  •             ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    
    • CategoryInfo : NotSpecified: (:) [Write-Error], WriteErrorException
    • FullyQualifiedErrorId : Microsoft.PowerShell.Commands.WriteErrorException,Export-GCECalendar
@gscales
Copy link
Owner

gscales commented Mar 11, 2021

You need to make sure that you have underlying rights to the Mailbox folder and also the applicaiton registration being used has calendar.read.shared

@Tulshiram1820
Copy link

@gscales

I am getting below error while running command :
image

Please help me

@gscales
Copy link
Owner

gscales commented Apr 12, 2021

Can you link to the script you using from that screenshot i can't really tell much, have you test the token in jwt.io and check that you have calendar.read.shared if you trying to access a resource mailbox

@Tulshiram1820
Copy link

Tulshiram1820 commented Apr 12, 2021

@gscales
image
Script
image
image

@gscales
Copy link
Owner

gscales commented Apr 12, 2021

If you look at the token in jwt.io what scopes do you see, based on the error your getting I expect the the User.Read.All is missing from the token have then all been consented to (your image cuts of there)

@Tulshiram1820
Copy link

image

Consent has been given

@gscales
Copy link
Owner

gscales commented Apr 12, 2021

So you need to look at what scopes are in the token that is being returned , mixing App and Delegate permission is generally not a good idea but should still work but if your getting User.Read in your token and not User.Read.All that would cause the error.

@Tulshiram1820
Copy link

@gscales do you have any script which can help me export all room mailbox calendar with Start date, end date, organizer, Location details.

For single room and multiple room.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants