I created a application in active directory and gave access to it at the resource group level and I am able to access the resources inside the resource group. But I don't see any option in preview portal to give access to the application at the subscription level.
When I am running the following code
ResourceManagementClient client =
testMain.createResourceManagementClient();
ResourceGroupOperations gpoperations = client.getResourceGroupsOperations();
ResourceGroup gp1 = new ResourceGroup("West US");
ResourceGroupCreateOrUpdateResult res = gpoperations.createOrUpdate("test123", gp1);
System.out.println("Resource group creation result" + res.getRequestId()+res.toString());
I am getting the following exception
Exception in thread "main" com.microsoft.windowsazure.exception.ServiceException: AuthorizationFailed: The client '2e027029-1019-46dc-b540-cbfe4a761647' with object id '2e027029-1019-46dc-b540-cbfe4a761647' does not have authorization to perform action 'Microsoft.Resources/subscriptions/resourcegroups/write' over scope '/subscriptions/88335ad5-6fe2-4532-b3d5-1af946310f85/resourcegroups/test123'. at com.microsoft.windowsazure.exception.ServiceException.createFromJson(ServiceException.java:292) at com.microsoft.azure.management.resources.ResourceGroupOperationsImpl.createOrUpdate(ResourceGroupOperationsImpl.java:495) at com.mycompany.resourcegroup.testMain.main(testMain.java:70)
How can i give access to the application, so that it can create and manage any resource group in my subscription ?