Forum Discussion
HarryPDF
Sep 25, 2023Copper Contributor
EXO command 'New-UnifiedGroup' issue on Linux version Powershell
I use below ExchangeOnline powershell (EXO v3.3) to create M365 group. New-UnifiedGroup -DisplayName "test_group" -Owner "<owner email address>" -PrimarySmtpAddress "<primary address>" ...
Sep 26, 2023
You could use -Verbose in the New-UnifiedGroup cmdlet. I'm not sure if that will show enough detail. I tried it again on my Ubuntu WSL on my Windows 11 machine, and it still works...
What you can do is enable logging (https://learn.microsoft.com/en-us/powershell/exchange/exchange-online-powershell-v2?view=exchange-ps#report-bugs-and-issues-for-the-exchange-online-powershell-module)
Connect-ExchangeOnline -EnableErrorReporting -LogDirectoryPath <Path to store log file> -LogLevel All
Not sure if that will also log the New-UnifiedGroup cmdlet?
HarryPDF
Sep 26, 2023Copper Contributor
Tried -verbose, but still nothing useful
VERBOSE: Returning precomputed version info: 3.3.0 VERBOSE: HTTP/1.1 POST with 214-byte payload VERBOSE: received 1003-byte response of content type text/html VERBOSE: Query 1 failed. VERBOSE: Getting message from error object New-UnifiedGroup: |Microsoft.Exchange.Configuration.Tasks.TaskException|The group can't be created |
I am working on Ubuntu 20, not sure if there is difference with WSL.
- Sep 26, 2023Are you using Certificate-Based Authentication? https://learn.microsoft.com/en-us/answers/questions/207505/unifiedgroup-new-set-remove-does-not-work-with-exo ? I used browser authentication.
- HarryPDFSep 26, 2023Copper Contributor
Here is the log file, but I still can't tell what's wrong.
I tried many different EXO commands on Linux version PS, so far only this command had problem, others works good as on Windows.
Got valid token from cache;Successfully got access token from cache;,Response status code does not
indicate success: 500 (Internal Server Error).- at System.Management.Automation.MshCommandRuntime.ThrowTerminatingError(ErrorRecord errorRecord);{"ClassName":"Mic
rosoft.Exchange.Configuration.Tasks.TaskException" "Message":"The group can't be created" "Data":null "InnerException":null "HelpURL":null "StackTraceString":"" "Re
moteStackTraceString":null "RemoteStackIndex":0 "ExceptionMethod":"8\nThrowError\nMicrosoft.Exchange.Configuration.ObjectModel Version=15.0.0.0 Culture=neutral P
ublicKeyToken=<xxxxx>\nMicrosoft.Exchange.Configuration.Tasks.Task\nVoid ThrowError(System.Exception System.Management.Automation.ErrorCategory System.Ob
ject System.String)" "HResult":-2146233088 "Source":"Microsoft.Exchange.Configuration.ObjectModel" "WatsonBuckets":null "localizedString":{"inserts":null "baseName
":"Microsoft.Exchange.Management.Tasks.Strings" "assemblyName":"Microsoft.Exchange.Management Version=15.0.0.0 Culture=neutral PublicKeyToken=<xxxxx>" "
id":"ErrorUnableToCreateGroup" "stringId":"" "showStringIdInUIIfError":false "showAssistanceInfoInUIIfError":false "fallback":"The group can't be created"}} : [] :
Exception;,2262.5965- Sep 26, 2023Can you try a different authentication method?
- HarryPDFSep 26, 2023Copper ContributorYes, I am using Certificated-Based auth, but with Certificated-based auth, same command does work without problem on Windows Powershell.....
- Sep 26, 2023There are other options, https://learn.microsoft.com/en-us/powershell/exchange/app-only-auth-powershell-v2?view=exchange-ps , haven't tested Certifcate-Based auth myself.
- Sep 26, 2023I'm running Ubuntu-20.04 in WSL, my verbose output is:
VERBOSE: Returning precomputed version info: 3.3.0
VERBOSE: HTTP/1.1 POST with 214-byte payload
VERBOSE: received 2824-byte response of content type application/json
I receive data as application/json, and you as text/html?