Add support for directory role activation #31
Merged
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.
Draft PR to add support for directory role activation. Some conversations probably needed before we can open a proper PR.
Activate method on a directory role
API does not support retrieving a single directory role by role template id; it does not support the OData Query Parameters either.
We could consider implementing the
ValidStatusFunc
on the client for theActivate
method but we wouldn't be able to return the object of the directory role.We could consider listing all directory roles within the
Activate
operation firstly and then check if the directory role exists. Activating it only if it does not exist. This is what a test function does at the current implementation. It could become a problem if implemented in theActivate
method in the case of List method returns a huge amount of directory roles.@manicminer Please let me know your thoughts.
Some reference links:
https://docs.microsoft.com/en-us/graph/api/resources/directoryroletemplate?view=graph-rest-beta#properties
https://docs.microsoft.com/en-us/azure/active-directory/roles/permissions-reference