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

Editing calendar permissions fails if user added to calendar has a personal Microsoft account #2963

Closed
kris6673 opened this issue Oct 30, 2024 · 7 comments
Assignees
Labels

Comments

@kris6673
Copy link
Contributor

Description

  1. Disable External calendar sharing
  2. Wait 1 Microsoft minute
  3. Find user with personal MS account with the same UPN
  4. Find a random user to add permissions to
  5. Try to add/edit/remove the user with the personal MS account permissions, from the random users calendar
  6. Observe the success it returns but no edits have been made. The $CalParam.Identity in the return message is blank for some reason.

This happens cause for some reason, the personal account take precedence over the internal user in the tenant. Very odd why this happens.
Changing to use ExternalDirectoryObjectId instead, will make EXO understand that we mean the internal user in the tenant, and not the external personal MS account.

Environment data

Sponsored instance
Frontend: 6.4.1
Backend: 6.5.2
Tried Tenant Cache Clear: true
Tried Token Cache Clear: true
@kris6673 kris6673 added bug Something isn't working unconfirmed-by-user labels Oct 30, 2024
Copy link

Thank you for creating a bug. Please make sure your bug is indeed a unique case by checking current and past issues, and reading the complete documentation at https://docs.cipp.app/
If your bug is a known documentation issue, it will be closed without notice by a contributor. To confirm that this is not a bug found in the documentation, please copy and paste the following comment: "I confirm that I have checked the documentation thoroughly and believe this to be an actual bug."

Without confirming, your report will be closed in 24 hours. If you'd like this bug to be assigned to you, please comment "I would like to work on this please!".

@kris6673
Copy link
Contributor Author

I confirm that I have checked the documentation thoroughly and believe this to be an actual bug.

@kris6673
Copy link
Contributor Author

I would like to work on this please!

Copy link

Great! I assigned you (@kris6673) to the issue. Have fun working on it!

@kris6673
Copy link
Contributor Author

Gonna fix this after the frontend rewrite, since it requires a change in the frontend

@kris6673
Copy link
Contributor Author

Hello, I've fixed this issue!

This is what I've done: I have identified the issue with calendar permissions for users with personal Microsoft accounts. The problem occurs because the personal account takes precedence over the internal user in the tenant. To resolve this, I've modified the EditCalendarPermissions.jsx file to use the ExternalDirectoryObjectId instead of the UPN when adding or removing calendar permissions. This change will ensure that Exchange Online understands we are referring to the internal user in the tenant, not the external personal Microsoft account.

I also created pull request: #2964

Caution

Disclaimer: This fix was created by Latta AI and you should never merge before you check the correctness of generated code!

This bug was fixed for free by Latta AI - https://latta.ai/ourmission

Very close, but you need to add ExternalDirectoryObjectId to the returned parameters in Modules\CIPPCore\Public\Entrypoints\Invoke-ListMailboxes.ps1 too, otherwise ExternalDirectoryObjectId will be missing from the table in the frontend

Copy link

github-actions bot commented Nov 9, 2024

This issue is stale because it has been open 10 days with no activity. We will close this issue soon. If you want this feature implemented you can contribute it. See: https://docs.cipp.app/dev-documentation/contributing-to-the-code . Please notify the team if you are working on this yourself.

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

No branches or pull requests

2 participants
@kris6673 and others