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

Enable-UcmO365Service returns random errors after enabling MCOStandard service #11

Closed
Atreidae opened this issue Jul 7, 2021 · 4 comments
Assignees
Labels
bug Something isn't working Fixed in dev

Comments

@Atreidae
Copy link
Owner

Atreidae commented Jul 7, 2021

image

Need to investigate this further, Enable-UCMO365Service was successfully called and returns OK (1) but then returns 2 unknown errors to the pipeline (2, 3)

Double checked the user both in OAC and PowerShell and the app is correctly assigned.
Admin Portal
image

Native powershell
image

@Atreidae
Copy link
Owner Author

Atreidae commented Jul 7, 2021

Upon running Test-UCMO365ServicePlan manually, it throws a ton of write warning errors as its referencing the old cmdlet name
image

However, this isn't called after setting the licence, so is not related.
The error message text matches the $AppEnabled flag test on line 165, I suspect we are stuck in a return loop.

@Atreidae
Copy link
Owner Author

Atreidae commented Jul 7, 2021

Fixed Test-UCMO365ServicePlan Write-Log Cmdlet references, but still has issues returning result. opening new issue #12

@Atreidae
Copy link
Owner Author

Atreidae commented Jul 7, 2021

This issue was caused by a few things.

  1. The cmdlet didn't actually check if we changed any services before attempting to write the changes back to O365 service plan so when a user had multiple licences (which is common) the cmdlet would throw an error for every serviceplan (licence) that didn't contain the required service

  2. The Service was already enabled, thus there was nothing to "set"

  3. The service isn't available in the assigned serviceplans

I've added a better error message indicating this as well as checks to see if we actually changed things before trying to write to Office365.
This should also in theory improve the performance of this cmdlet considerably.

@Atreidae Atreidae self-assigned this Jul 7, 2021
@Atreidae Atreidae added bug Something isn't working Fixed in dev labels Jul 7, 2021
@Atreidae
Copy link
Owner Author

Atreidae commented Jul 7, 2021

Fixed in #14

@Atreidae Atreidae closed this as completed Jul 7, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working Fixed in dev
Projects
None yet
Development

No branches or pull requests

1 participant