Search code examples
kiota

Getting scopes of a request built by Kiota


When building a custom authentication provider for a Kiota-generated SDK, I'd like to know which scopes are required for the request I'm about to authenticate. Is this information available somewhere in the generated code? I was hoping that maybe the additionalAuthenticationContext argument would include this data but that doesn't seem to be the case.


Solution

  • Kiota does not take advantage of the security requirements on operations today when generating code and later on crafting the requests to be sent. This could be a nice addition, feel free to start a new issue on the repository.

    For the Azure Identity authentication provider the assumption is the end user will know in advance the scopes that are required and provide the scopes to the Authentication Provider object to they can be used during the request.