Support for the appRolesAssignedTo endpoint for service principals #107
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There are two ways to assign app roles, which essentially link and grant consent between some service principal that represents an application with resources to be accessed, and a user or group, or another service principal representing another app, that wishes to access those resources.
The first way, which is supported by the existing client(s), is to assign the app role to the beneficiary principal (user, group or SP).
The second way, which is the recommended method per the docs, is to assign out the app roles from the service principal hosting the resources. This PR adds a client and tests for this approach.
Docs for new endpoint: https://docs.microsoft.com/en-us/graph/api/serviceprincipal-post-approleassignedto?view=graph-rest-1.0&tabs=http
Docs for existing endpoint (note the purple box): https://docs.microsoft.com/en-us/graph/api/serviceprincipal-post-approleassignments?view=graph-rest-1.0&tabs=http