Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support for the appRolesAssignedTo endpoint for service principals #107

Merged
merged 1 commit into from
Sep 22, 2021

Conversation

manicminer
Copy link
Owner

@manicminer manicminer commented Sep 21, 2021

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

Copy link
Collaborator

@jackofallops jackofallops left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM 🚀

@manicminer manicminer merged commit d13f6cc into main Sep 22, 2021
@manicminer manicminer deleted the feature/app-roles-assigned-to-client branch September 22, 2021 15:01
manicminer added a commit that referenced this pull request Sep 22, 2021
manicminer added a commit to kaovd/hamilton that referenced this pull request Sep 30, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request package/msgraph
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants