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

Missing scope LicenseAssignment.Read.All in Azure Portal #3055

Open
Zoddo opened this issue Dec 18, 2024 · 1 comment
Open

Missing scope LicenseAssignment.Read.All in Azure Portal #3055

Zoddo opened this issue Dec 18, 2024 · 1 comment
Labels
status:waiting-for-triage An issue that is yet to be reviewed or assigned type:bug A broken experience

Comments

@Zoddo
Copy link

Zoddo commented Dec 18, 2024

Describe the bug

Trying to use Get-MgSubscribedSku through an unattended application, I wanted to add the LicenseAssignment.Read.All scope to my app registration.

However, the scope doesn't appear in the Azure Portal (neither as Application or Delegated permissions):
image

The scope does however exist in the backend, because if I do an interactive login with Connect-MgGraph -Scope LicenseAssignment.Read.All, I'm correctly prompted to approve the scope, and it appears in the "User consent" section of the enterprise application (as Delegated, of course).

Expected behavior

I can add the LicenseAssignment.Read.All scope as an Application's permission in the app registration, and grant an admin consent

How to reproduce

  1. Create an app registration on the Azure Portal
  2. Try to add the LicenseAssignment.Read.All scope on the Microsoft Graph API
  3. The scope isn't shown.

SDK Version

N/A

Latest version known to work for scenario above?

No response

Known Workarounds

I haven't found any workaround. I wanted to manually add the scope in the manifest, but I wasn't able to find the role ID to use.

Debug output

No response

Configuration

No response

Other information

No response

@Zoddo Zoddo added status:waiting-for-triage An issue that is yet to be reviewed or assigned type:bug A broken experience labels Dec 18, 2024
@Zoddo
Copy link
Author

Zoddo commented Dec 18, 2024

I managed to find the role ID for LicenseAssignment.Read.All:

e2f98668-2877-4f38-a2f4-8202e0717aa1

I can manually add it in the manifest, then do an admin consent from the enterprise application (the button in the app registration itself break due to the ""unkonwn"" role), and that worked.

At least I have a workaround that don't require to give write access to all licence assignments to my app.

Microsoft should probably still add the scope to the portal's list so it can be added through normal, supported means.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
status:waiting-for-triage An issue that is yet to be reviewed or assigned type:bug A broken experience
Projects
None yet
Development

No branches or pull requests

1 participant