-
Notifications
You must be signed in to change notification settings - Fork 3.9k
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
Unable to assign app permissions to a managed identity resource. #18412
Comments
Hi @josefehse , AzureAD object has 2 ids. For instance, Ad app has one id called applicationId and another one called objectid. Both are GUID. |
Hi @dingmeng-xue , I am aware of Object Id and App Id. The problem is as follows: Get-AzADApplication can't find it: Therefore, Add-azaddapppermision won't work, since it is using get-azadapplication, as per the previous screenshot. |
@josefehse , current API permission setting is only on Ad App. It likes what user can do on Portal. @Francisco-Gamino , could you help to look into this question? How can user grant API permission of MSGraph to Functions app? |
|
Hello @josefehse -- What AD module you are using? And where are you installing it from? |
Hello @Francisco-Gamino, you can see the code in the link I've sent. I just import it as per below. The code is normally run from the Cloud Shell. |
Adding @maertendMSFT from the CloudShell team. Hello @josefehse -- I had a sync with @maertendMSFT offline and it looks like the |
Hello @Francisco-Gamino, we seem to have a disconnection. This is the module I use today and it works. I am only using the preview because of an issue with the cloud shell. What I need to work is the new AzAd commands, which don't, as per all the previous communications. You asked me which one AzureAD module I am using and that's what I've sent. What I am trying to use is, which I've just installed using the regular repository. I hope that is makes it clear. |
Thank you @josefehse for the clarification. Hi @dingmeng-xue -- This blog talks about how to Grant Graph API Permission to Managed Identity Object using the Azure AD cmdlets. Could you please advice what are the equivalent |
AzureAD cmdlet leverages API It requires new cmdlet to support it. @josefehse , you also can use |
You can now assign approleassignments to MI resources using |
Description
Trying to assing microsoft graph permissions to a managed identify azure function.


The old method (AzureAD) works fine. With the new module, here's the issue:
I can get application ID and object ID of the MI using Get-azadServicePrincipal.
When trying to use Add-AzADPermission it fails:
You can see the module uses get-azadapplication:
However, get-azadapplication won't find service principals for Managed Identities, only Enterprise Applications.
Am I missing something or is it a gap?
Thank you.
Issue script & Debug output
Environment data
Module versions
Error output
The text was updated successfully, but these errors were encountered: