question

PatelBrijesh-0972 avatar image
0 Votes"
PatelBrijesh-0972 asked PatelBrijesh-0972 commented

Creating shared mailbox in exchange online Programmatically

Hello All,

We have a requirement where we need to connect to EXO and create a shared mailbox from a server using Java code. Is something like this possible? if so, can someone please guide me to correct documentation? We currently have java code running PowerShell v2 where the script creates a shared mailbox on premise.

I see in the some documentation that we need to connect to Exchange-online via PowerShell, but not sure how authentication can be done programmatically.

Thanks!

windows-server-powershelloffice-exchange-online-itprooffice-exchange-server-dev
· 1
5 |1600 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.

Hi @PatelBrijesh-0972 ,

Thanks for posting in our Q&A. For this issue,It is more related to the Exchange-server-development. To get accurate help, I will add this exhcange-server-dev tag. Thanks.

0 Votes 0 ·

1 Answer

AndyDavid avatar image
0 Votes"
AndyDavid answered PatelBrijesh-0972 commented

Are you syncing from on-prem to Exchange Online with AADConnect?
If so, then what you really want to do is create a remote shared mailbox with your existing code on-prem and not directly in 365.

For connecting to Exchange Online, use the App-based auth:

https://docs.microsoft.com/en-us/powershell/exchange/app-only-auth-powershell-v2?view=exchange-ps

· 1
5 |1600 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.

Hello Andy, thanks for your answer. Can you please tell me how it will work? Will I be using the name of the app as UPN with the "Connect-ExchangeOnline" in powershell?

0 Votes 0 ·