mirror of
https://github.com/KelvinTegelaar/CIPP.git
synced 2026-04-25 08:16:01 +03:00
[GH-ISSUE #2938] Edit Tenant - Could not find tenant in contract endpoint #1457
Labels
No labels
API
Feature
NotABug
NotABug
Planned
Sponsor Priority
Sponsor Priority
bug
documentation
duplicate
enhancement
needs more info
no-activity
no-priority
not-assigned
pull-request
react-conversion
react-conversion
roadmap
security
stale
unconfirmed-by-user
unconfirmed-by-user
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/CIPP#1457
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @linussalomonsson on GitHub (Oct 11, 2024).
Original GitHub issue: https://github.com/KelvinTegelaar/CIPP/issues/2938
Description
I apologize in advance as I am not a dev and not acquainted with GitHub etiquette.
When editing certain tenants, the error of not finding the tenant in the contract endpoint appears even when a reseller relationship exists.
After some troubleshooting, the error appears due to pagination when calling the contract endpoint, hence some tenants are editable and some are not.
I have updated the PowerShell code and tested on my installation and the changes below appear to work on all our tenants.
Invoke-EditTenant.ps1
Updated code:
Environment data
@github-actions[bot] commented on GitHub (Oct 11, 2024):
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!".
@linussalomonsson commented on GitHub (Oct 11, 2024):
I confirm that I have checked the documentation thoroughly and believe this to be an actual bug.
@KelvinTegelaar commented on GitHub (Oct 11, 2024):
Microsoft only supports GET for this endpoint: https://learn.microsoft.com/en-us/graph/api/resources/contract?view=graph-rest-beta. Sending a patch to this endpoint actually sends a patch to the underlying organization, getting results you would not want in many cases. The old windows.net endpoint is also being shutdown.
Editing the tenant is no longer possible, as Microsoft does not want a separation between the name in Partner Center vs the name the tenant actually has. If you want the names to match after a change you can clear CIPPs tenant cache to refresh the name within CIPP, if it is out-dated.