I've got some trouble with Azure AD authorization for APIs with active roles. Here are my steps:
- I've created an Azure AD App and activated the option "User assignment required"
- In the manifest I've created the roles
- In my WebApp I've used ADAL and my assigned users can log in. Everything works fine
My problem: Now I have another API/Batch which should "log in" into my AD-App. Easy I thought -> I've created an secret key and my Parameters for my request looks like:
URL for Login: https://login.microsoftonline.com/MyTenantID
ClientID: myAppID of the AD-App
Key: MyKey
ResourceID: MyAppID of the AD-App
-> Error: Application 'xxx' is not assigned to a role for the ...
So what I am doing wrong? How can I assign the APP to login 'by itself'?