microsoftgraph / microsoft-graph-explorer-v4

React/Redux version of Graph Explorer used to learn the Microsoft Graph Api
https://developer.microsoft.com/graph/graph-explorer
MIT License
212 stars 93 forks source link

Intents do not expand their assignments #2051

Closed AcpPasc closed 2 years ago

AcpPasc commented 2 years ago

Describe the bug When calling the api (in my case from the graph explorer), trying to get all Intents and their assignements, all assignements are empty

To Reproduce Steps to reproduce the behavior:

  1. Go to '(https://developer.microsoft.com/en-us/graph/graph-explorer)'
  2. Connect to any Tenant with Assigned Intents
  3. Make a GET Request on 'https://graph.microsoft.com/beta/deviceManagement/intents?$expand=assignments'
  4. See error '"assignments": []'

Expected behavior I would expect an array of the assigned Objects (Hashtables) with id and target{}

Screenshots

{
    "@odata.context": "https://graph.microsoft.com/beta/$metadata#deviceManagement/intents(id,displayName,isAssigned,assignments,assignments())",
    "value": [
        {
            "id": "672884ca-XXX",
            "displayName": "Security Baseline Edge - Sep. 2020",
            "isAssigned": true,
            "assignments@odata.context": "https://graph.microsoft.com/beta/$metadata#deviceManagement/intents('672884ca-XXX')/assignments",
            "assignments": []
        },
        {
            "id": "bd899b42-XXX",
            "displayName": "Security Baseline for Windows 10 and later - Nov. 2021",
            "isAssigned": true,
            "assignments@odata.context": "https://graph.microsoft.com/beta/$metadata#deviceManagement/intents('bd899b42-XXX')/assignments",
            "assignments": []
        }
    ]
}

Desktop (please complete the following information):

Additional context

Onokaev commented 2 years ago

Hey @AcpPasc. I have been able to reproduce this. However, we cannot fix this on the Graph Explorer side. Let me open an issue on the Graph Q and A page for a wider Graph audience

Onokaev commented 2 years ago

Here is a link to the question on the Graph Q and A: https://docs.microsoft.com/en-us/answers/questions/993931/intents-do-not-expand-their-assignments.html

Onokaev commented 2 years ago

Let me know if you need any further assistance

AcpPasc commented 2 years ago

I do not need further assistance. Thanks for the Info @Onokaev. For now, I can work around it with not optimal secondary requests.

Onokaev commented 2 years ago

Sounds good. If you don't mind, could you add your workaround to the question I have asked on the QandA?

AcpPasc commented 2 years ago

Sounds good. If you don't mind, could you add your workaround to the question I have asked on the QandA?

Sure!