Oct 12 2016
- last edited on
Jul 24 2020
I've been working on scripting ways to create applications on the fly and apply group permisisons, but I'm a bit stuck.
What I'm doing is creating an app for a Sharepoint Online site, adding users to a group then trying to add the group to have access to the app.
For App creation if I use this command:
New-AzureRmADApplication -DisplayName "ABC -HomePage "https://URLGOESHERE -IdentifierUris "URLGOESHERE"
When I do that, the app doesn't have the option via Azure AD GUI to turn "User assignment required to access app" off or on as it's greyed out, and if I try to make a change via the GUI it gives a generic error.
So, if I create the app manually.. how do I give a group permission to the app?
but when I try that, I get this error:
New-AzureADUserAppRoleAssignment : Error occurred while executing NewUserAppRoleAssignment
Message: One or more properties are invalid.
I'm stuck now, so wondering if anyone has successfully done this, or can point me in the right direction?
Oct 20 2016 07:07 AM
I would recommend asking this question in the SharePoint Developers space, some of the people from the PnP team may be able to answer this type of question.
Oct 21 2016 05:55 AM
This doesn't really have anything to do with SharePoint Online though, it just happens to be the URL destination of the app I'm adding. Could be anything and the same applies.
Oct 21 2016 06:15 AM
Well, it may not be a SPO issue, but the community space at https://techcommunity.microsoft.com/t5/SharePoint-Developer/bd-p/SharePointDev has a lot more activity than this one, and the people in that Space are really smart and always helpful.
Nov 14 2016 04:23 PM
I'm not having a go here, but why does this forum exist if it's recommended to post on topic ideas elsewhere? :)
Feb 19 2017 03:40 PMSolution
Ended up working out how to do this, here's my writeup for anyone else interested:
Feb 23 2017 08:33 PM
Hey Adam, you`re more than welcome to post here! Glad to see you worked this out and shared the resolution for others that may have the same issue. You`re a hero ;)