Page 1 of 2

Office 365 Configuration Wizard Broken Text

Posted: Wed Jan 27, 2021 1:40 pm
by J.A.K
Never tried this particular config wizard before, but I have a feeling the second part shouldn't look like this? Not sure if that C:\Users\mgurthie is intended to be some example not displaying properly or something got saved into this config wizard that shouldn't have.
Capture.PNG

Re: Office 365 Configuration Wizard Broken Text

Posted: Thu Jan 28, 2021 5:01 pm
by benjaminsmith
Hi,

Thanks for posting this, it looks like there is a bug in the wizard. If you can run a couple of direct commands from the CLI, that would help us gather some more information as I'm not able to replicate this on my test server. The commands will need application id, directory id, and secret from your account.

Organization

Code: Select all

/usr/local/nagios/libexec/check_microsoft_365.php --tenant 'directory id' --appid 'application id' --secret 'secret' --warning '0' --critical '1' --mode 'organization'
Users

Code: Select all

/usr/local/nagios/libexec/check_microsoft_365.php --tenant 'directory id' --appid 'application id' --secret 'secret' --warning '0' --critical '1' --mode 'userslist
Best Regards,
Benjamin

Re: Office 365 Configuration Wizard Broken Text

Posted: Thu Jan 28, 2021 5:14 pm
by J.A.K
Output on the first is:

{"@odata.context":"https://graph.microsoft.com/v1.0/$metad ... e)","value":[{"displayName":"Windstream Communications","tenantType":"AAD"}]}

and the second is:

PHP Notice: Undefined offset: 0 in /Nagios/usr/local/nagios/libexec/check_microsoft_365.php on line 3003
PHP Notice: Undefined index: value in /Nagios/usr/local/nagios/libexec/check_microsoft_365.php on line 3017
PHP Warning: array_merge(): Argument #2 is not an array in /Nagios/usr/local/nagios/libexec/check_microsoft_365.php on line 3017
PHP Warning: array_merge(): Argument #2 is not an array in /Nagios/usr/local/nagios/libexec/check_microsoft_365.php on line 3017
PHP Warning: array_merge(): Argument #2 is not an array in /Nagios/usr/local/nagios/libexec/check_microsoft_365.php on line 3017
PHP Warning: array_merge(): Argument #2 is not an array in /Nagios/usr/local/nagios/libexec/check_microsoft_365.php on line 3017
PHP Warning: array_merge(): Argument #2 is not an array in /Nagios/usr/local/nagios/libexec/check_microsoft_365.php on line 3017
PHP Warning: array_merge(): Argument #2 is not an array in /Nagios/usr/local/nagios/libexec/check_microsoft_365.php on line 3017
PHP Warning: array_merge(): Argument #2 is not an array in /Nagios/usr/local/nagios/libexec/check_microsoft_365.php on line 3017
PHP Warning: array_merge(): Argument #2 is not an array in /Nagios/usr/local/nagios/libexec/check_microsoft_365.php on line 3017
PHP Warning: array_merge(): Argument #2 is not an array in /Nagios/usr/local/nagios/libexec/check_microsoft_365.php on line 3017
PHP Warning: array_merge(): Argument #2 is not an array in /Nagios/usr/local/nagios/libexec/check_microsoft_365.php on line 3017
PHP Warning: array_merge(): Argument #2 is not an array in /Nagios/usr/local/nagios/libexec/check_microsoft_365.php on line 3034
{"value":null}

Re: Office 365 Configuration Wizard Broken Text

Posted: Fri Jan 29, 2021 11:57 am
by benjaminsmith
HI J.A.K,

That's very helpful. The first one looks good, can you run the second one once more what the verbose option added, for example:

Code: Select all

/usr/local/nagios/libexec/check_microsoft_365.php --tenant 'directory id' --appid 'application id' --secret 'secret' --warning '0' --critical '1' --mode 'userslist' -vvv
Please note the output will contain the secret in a few places, so I would recommend removing that before posting.

Thank you!
Benjamin

Re: Office 365 Configuration Wizard Broken Text

Posted: Fri Jan 29, 2021 1:28 pm
by J.A.K
Piping the output to a txt file has it at about 400MB. I'd rather not post it here with the kind of information it pertains, would the PM system support sending a file of that size?

Re: Office 365 Configuration Wizard Broken Text

Posted: Fri Jan 29, 2021 5:57 pm
by benjaminsmith
Hi J.A.K,

I checked back with the developer on this one and they will make a quick script to grab the critical output here.

If possible, try to compress this down, and if it gets small enough, send it over in a PM. If not, I will attach the script to the thread.

Thanks!
Benjamin

Re: Office 365 Configuration Wizard Broken Text

Posted: Fri Jan 29, 2021 8:18 pm
by J.A.K
All text so if you're ok with .7z it compresses down to a couple of MB. Still you're looking at nearly 10 million lines of text since it's dumping nearly every object in Azure.
Capture.PNG
I'll PM that over now, but shoot the script my way if you want me to give it a whirl.

Re: Office 365 Configuration Wizard Broken Text

Posted: Mon Feb 01, 2021 4:01 pm
by benjaminsmith
Hi,

Thanks for the output file, I sent that over to the developer. If you have some time later, I've attached the script. Please change the extension to a PHP file, as that cannot be uploaded.

Commands:

Code: Select all

./check_ms365.php --tenant 'directory id' --appid 'application id' --secret 'secret' --warning '0' --critical '1' --mode 'userslist'
And to limit the data:

Code: Select all

./check_ms365.php --tenant 'directory id' --appid 'application id' --secret 'secret' --warning '0' --critical '1' --mode 'userslist' --datalimit 2
Thanks!
Benjamin

Re: Office 365 Configuration Wizard Broken Text

Posted: Mon Feb 01, 2021 5:03 pm
by J.A.K
Here you go. Ran it with that data limit 2. Couple of errors in there so hopefully that helps.
output.log

Re: Office 365 Configuration Wizard Broken Text

Posted: Tue Feb 02, 2021 2:04 pm
by benjaminsmith
Hi @J.A.K,

Excellent. Really appreciate the assistance on this. I'm reaching out to the developer again and I'll update you once I have more information.

Thanks,
Benjamin