I have a script to get a xml list with all user with office 365 license.
we have serveral customers with O365 environment that we manage.
is there a way to change the script that it connects to multiple tenants and get the list from there.
is there further also possible to build in de the Admin credentials with secure password?
There’s no way to build in the Administrator credential securely, no, because you’d be storing the password in clear text.
And yes, it should in theory be possible to connect to multiple tenants at once, but each of those would be a unique and individual connection. You can’t say, “run this command against these 12 tenants all at once,” necessarily (although, depending on the command involved, you might be able to send the same command to all the connection in parallel).