Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
Question
Thursday, April 9, 2020 6:31 AM
Hi
I am trying to run the New-ApplicationAccessPolicy command in order to scope permissions for mailboxes. I completely followed the steps from links how to connect to Exchange online powershell. I connected to exchange successfully and i am able to run some of the commands, like Get-EXOMailbox or Get-Mailbox.But when i tried other commands like New-ApplicationAccessPolicy or Get-ApplicationAccessPolicy, i receive an error:
"
The term 'New-ApplicationAccessPolicy' is not recognized as the name of a cmdlet, function, script file, or operable program. Check the spelling of the name, or if a path was included, verify that the path is correct and try again.
"
Does it mean that i need additional modules to install and if yes, which ones. Please advice how to proceed.
Version of powershell is 5.1
Regards,
Elena
All replies (5)
Thursday, April 9, 2020 7:51 AM ✅Answered | 1 vote
You need to have the "Organization Configuration" role assigned to you in order to run this cmdlet. Assign it to your account and restart PS to make sure the new assignment is in effect.
Friday, April 10, 2020 8:15 AM ✅Answered | 2 votes
You should use a mail enabled security group for it.
You can also use command below to check whether is it supported:
Regards,
Kyle Xu
Please remember to mark the replies as answers if they helped. If you have feedback for TechNet Subscriber Support, contact [email protected].
Friday, April 10, 2020 1:55 AM | 1 vote
Hi Elena,
You can use command below to check which permission group is needed when you want to run a command:
Get-ManagementRole -Cmdlet New-ApplicationAccessPolicy
After assign permission, you need to reconnect to Exchange online PowerShell. If you have the permission, you could use "Tab" to complete the command automatically:
Regards,
Kyle Xu
Please remember to mark the replies as answers if they helped. If you have feedback for TechNet Subscriber Support, contact [email protected].
Friday, April 10, 2020 7:59 AM
Hi
Thanks for the info from above.
My user is now part of the Organization Management:
I am able now to run Get-ManagementRole and the New-ApplicationAccessPolicy cmdlet is accessible.
But when i run the New- ... command, i receive an error:
The group i intend to use is configured as:
What i am doing wrong?
Regards
Elena
Friday, April 10, 2020 11:15 AM
Thank you!
It works now.
Regards,
Elena