Forum Discussion
Native App for data push with auto login
Hi,
I'm trying to do the same thing:
You can't generate an app key when you have selected Native app type. You have to select Web/API.
This sample shows you how to use the app secret:
https://github.com/azure-samples/active-directory-dotnet-daemon
I get 401 errors when I try to call the REST API though. This is even though my app has been granted permissions by a Global Admin.
Hello,
Thanks for the answer, By using a Web App I haven't any problem to perform a login with no GUI for authentication. However I got a 401 error when I try to call the REST API like you.
For Power BI Service I've granted any king of delegate authorizations that requires no administrator privileges. However I've a problem to grant the authorization "Access the directory as the signed-in user" even if doesn't require administrator privileges. Maybe is this the problem?
- tripleacoder7 years agoHelper I
I am not sure the Delegated permissions are used at all when authenticating using an app key/service principal...
Types of permissions
Azure AD defines two kinds of permissions:
- Delegated permissions - Are used by apps that have a signed-in user present. For these apps, either the user or an administrator consents to the permissions that the app requests and the app is delegated permission to act as the signed-in user when making calls to an API. Depending on the API, the user may not be able to consent to the API directly and would instead require an administrator to provide "admin consent".
- Application permissions - Are used by apps that run without a signed-in user present; for example, apps that run as background services or daemons. Application permissions can only be consented by an administrator because they are typically powerful and allow access to data across user-boundaries, or data that would otherwise be restricted to administrators.