You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Declare application roles and delegated scopes with -SkipGrant so
administrators can grant consent in Entra without running the script.
- Preserve existing API permissions and avoid duplicate declarations
- Report declared permissions, consent failures, and portal links
- Add regression coverage for permission merging and idempotency
When an existing app is selected with -AppId, $DisplayName can still be the unrelated default value, even though the fetched application has its real display name. The confirmation can therefore ask the operator to approve a permissions PATCH for the wrong-looking target. Use the fetched app identity (ideally name plus app ID) in this approval boundary.
This issue also appears on line 1569 of the same file.
This completeness check only considers permissions that resolved successfully. Roles recorded in $missing and delegated scopes skipped as unpublished never enter these collections, so a partially enrolled tenant can be told that all selected permissions are declared and be sent to consent to an incomplete set. Track unresolved delegated scopes as well, include all unresolved permissions in this predicate, and expose them in the summary/guidance.
Legacy admin consent link lacks registered redirect URI
The script creates applications without a redirect URI, so this legacy /adminconsent link has no registered reply address and can fail with AADSTS500113 for a newly created app. That makes the advertised handoff link unusable. Either direct administrators only to the working Entra portal URL, or register a callback and generate a consent URL with its matching redirect_uri; update the summary and regression assertion consistently.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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.
Declare application roles and delegated scopes with -SkipGrant so administrators can grant consent in Entra without running the script.