Hi @Stucki Cédric, BKW , you can still use admin-restricted scopes in non-interactive applications by using the "on-behalf-of" flow.
The OBO flow allows a daemon or backend service to obtain an access token for a downstream API on behalf of a user. In this case, the user is an administrator who has consented to the admin-restricted scope. The daemon or backend service can then use the access token to call the downstream API with the higher-privileged operation.
Both app roles and scopes can be used for daemon apps or back-end services that need to authenticate and make authorized API calls as themselves, without the interaction of a user. The choice between app roles and scopes depends on the specific requirements of your application.
Scopes are typically used to control access to specific resources or operations within an API while app roles are typically used to define roles or permissions that are assigned to users or applications.
The admin-restricted scope is used to provide access to higher-privileged operations that can only be consented to by an administrator. This is a scenario where scopes are more appropriate than app roles, as the scope is used to control access to a specific operation within the API.
In other scenarios where you want to define a set of roles or permissions that can be assigned to users or applications, app roles may be more appropriate. For example, if you have an API that provides access to different resources based on the role of the user or application, you may want to define app roles that correspond to each resource.
I hope this helps!
Please let me know if you have any questions and I can help you further.
If this answer helps you please mark "Accept Answer" so other users can reference it.
Thank you,
James