question

MaqsoodAliBhatti-7754 avatar image
0 Votes"
MaqsoodAliBhatti-7754 asked ·

Exchange online V2 Module and Modern authentication EXO V2 But only Get-?

We want to execute some tasks (non-interactive) as service account, ( against Microsoft Exchange such as Created Achieve Mailbox, Created Shared Mailbox, this looks like we do not have to use basic authentication with Connect-ExchangeOnline as this is deprecated, and we have to use EXO V2 module with modern authentication.

When we read and see what we can do with EXO V2 module, it only has very few Get- operations available not all the Set- operations which works with old Connect-ExchangeOnline module, so we are bit confused what to use then?


any best practices?

Our best runtime options are Azure functions as preferable if thats possible to run it from there.

/Maqsood.


office-exchange-server-connectivity
10 |1000 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

AndyDavid avatar image
0 Votes"
AndyDavid answered ·

Which specific commands are you referring to? They are all available using Connect-ExchangeOnline



·
10 |1000 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

MaqsoodAliBhatti-7754 avatar image
0 Votes"
MaqsoodAliBhatti-7754 answered ·

 @AndyDavid command that we want to execute non - interactively


Enable-Mailbox -Identity <username> -Archive

Set-Mailbox "Dan Jump" -EmailAddresses @{add="dan.jump@northamerica.contoso.com"}

New-Mailbox -Shared -Name "Sales Department" -DisplayName "Sales Department" -Alias Sales |

Set-Mailbox -GrantSendOnBehalfTo MarketingSG | Add-MailboxPermission -User MarketingSG -AccessRights FullAccess -InheritanceType All


as we understand EXO V2 is backed by new REST API, do you know if the above functions are exposed in the REST API? (we can call the REST API) directly if these are available.

https://outlook.office.com/adminApi/beta/xxxxxxxx-352a-4eda-bece-09d0684d0cfb/Mailbox


/Maqsood

·
10 |1000 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

AndyDavid avatar image
0 Votes"
AndyDavid answered ·

As far as I know they are not exposed right now outside of the ExO module. - Perhaps in the future.
But all those commands can be run with V2 module.

·
10 |1000 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

EricYin-MSFT avatar image
0 Votes"
EricYin-MSFT answered ·

Hi,
I've tried connecting to Exchange Online PowerShell V2 module using modern authentication and the commands work for me.
What error did you meet?
Reference steps: Connect to Exchange Online PowerShell using modern authentication


If an Answer is helpful, please click "Accept Answer" and upvote it.
Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.


· 1 ·
10 |1000 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

I am writing here to confirm with you how the thing going now?
If you need further help, please provide more detailed information, so that we can give more appropriate suggestions.


If an Answer is helpful, please click "Accept Answer" and upvote it.
Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.


0 Votes 0 ·