-
Notifications
You must be signed in to change notification settings - Fork 3.4k
Description
When trying to programmatically create an ad application for use with Terraform, the required-access does not appear to be applied to the Principle until the "Grant Permissions" button in the portal is clicked.
To reproduce:
az ad app create --display-name testapp1 --required-resource-accesses @manifest.json --identifier-uris http://testapp1
manifest.json contains:
[
{
"resourceAppId": "00000002-0000-0000-c000-000000000000",
"resourceAccess": [
{
"id": "cba73afc-7f69-4d86-8450-4978e04ecd1a",
"type": "Scope"
},
{
"id": "311a71cc-e848-46a1-bdf8-97ff7156d8e6",
"type": "Scope"
}
]
}
]
The application is expected to be given the following permissions:
- Read and write all applications
- Sign in and read user profile
The manifest in the portal appears to be correct and the permissions blade shows the correctly ticked options, however we still do not have the required access.
Without changing anything, we can click the "Grant Permissions" button and access then works.
I have done this with another manifest without the "Requires Admin" option and that appears to work. If this is the case, is there a way to force this through on the CLI without heading to the Portal?
I have searched for documentation as to whether this is something else I need to be doing, but I haven't found anything, leading me to believe this may be a bug.