You can follow this url
http://docs.splunk.com/Documentation/AddOns/released/MSCloudServices/Configureaccount
use your terminal and add the data, It will not ask the microsoft credentials.
Connect to your account using configuration files
If you do not have access to Splunk Web on your data collection node, you can configure the connection to your account using the configuration files.
Create or open $SPLUNK_HOME/etc/apps/Splunk_TA_microsoft-cloudservices/local/splunk_ta_ms_o365_server_accounts.conf.
Add the following stanza.
[]
client_id =
client_secret =
tenant_id =
... View more