Azure / Azure/azure-powershell
Unable to get AppRoleAssignedTo Data
- Dominant language
- C#
- Stars
- 4.8k
- Forks
- 4.3k
- Avg merge
- 3d 14h
- Merged PRs (30d)
- 54
Description
### Description
Running `Get-AzADServicePrincipal -ObjectId XXX` returns MicrosoftGraphServicePrincipal which has an AppRoleAssignedTo property. But this property is empty. Trying to encourage the retrieval of AppRoleAssignedTo data I tried `Get-AzADServicePrincipal -ObjectId XXX -Select AppRoleAssignedTo`. This resulted in a Request Uri of https://graph.microsoft.com/v1.0/servicePrincipals/XXX?$select=AppRoleAssignedTo. But the AppRoleAssignedTo property was still empty. The correct Uri to retrieve this data is https://graph.microsoft.com/v1.0/servicePrincipals/XXX/appRoleAssignedTo.
### Issue script & Debug output
```PowerShell
N/A
```
### Environment data
```PowerShell
Name Value
---- -----
PSVersion 7.2.2
PSEdition Core
GitCommitId 7.2.2
OS Microsoft Windows 10.0.19043
Platform Win32NT
PSCompatibleVersions {1.0, 2.0, 3.0, 4.0…}
PSRemotingProtocolVersion 2.3
SerializationVersion 1.1.0.1
WSManStackVersion 3.0
```
### Module versions
```PowerShell
ModuleType Version PreRelease Name ExportedCommands
---------- ------- ---------- ---- ----------------
Script 2.9.0 Az.Accounts {Add-AzEnvironment, Clear-AzConfig, Clear-AzContext, Clear-AzDefault…}
Script 6.0.1 Az.Resources {Export-AzResourceGroup, Export-AzTemplateSpec, Get-AzDenyAssignment, Get-AzDeployment…}
```
### Error output
```PowerShell
N/A
```
Contributor guide
Assessment
This issue has not been assessed yet.