获取 /communications/calls Microsoft Graph 终端点返回错误 7503

huangapple go评论98阅读模式
英文:

Get /communications/calls Microsoft Graph endpoint retuning error 7503

问题

我相信一切都好。

我正在使用Microsoft Graph API将Microsoft Teams集成到我的应用程序中。我已经使大多数API正常工作,比如获取在线会议、获取通话录音等等,但是我在使用端点"GET /communications/calls"时无法获取Teams中的通话。在我的端上无法正常工作,我不确定原因,因为我已经添加了所有与获取通话API相关的API权限,比如Calls.Initiate.All、Calls.AccessMedia.All等等。我能够使用相同的Microsoft应用程序调用其他API。我之所以要调用这个API,是因为我想获取特定用户在Teams上的活动通话。

我收到以下错误消息。有人可以帮助解决这个问题吗?

{
    "error": {
        "code": "UnknownError",
        "message": "{\"errorCode\":\"7503\",\"message\":\"Application is not registered in our store.\",\"instanceAnnotations\":[]}",
        "innerError": {
            "date": "2023-07-06T16:00:28",
            "request-id": "2a24be83-c150-4e11-b639-3ce49686becc",
            "client-request-id": "2a24be83-c150-4e11-b639-3ce49686becc"
        }
    }
}
英文:

I trust all is well.

I am integrating Microsoft Teams with my application using Microsoft Graph APIs. I have most of the APIs working such as Get online meetings, Get call recording etc. but I am struggling to get calls from teams using the endpoint "GET /communications/calls". Is not working in my end and I am not sure why because I added all the API permissions for Get Calls API such as Calls.Initiate.All, Calls.AccessMedia.All etc. I am able to call other APIs with the same Microsoft Application. The reason to call this API I will like to get the active calls for the particular user on teams.

I am getting the following error message. Can someone help with this issue please?

{
"error": {
"code": "UnknownError",
"message": "{"errorCode":"7503","message":"Application is not registered in our store.","instanceAnnotations":[]}",
"innerError": {
"date": "2023-07-06T16:00:28",
"request-id": "2a24be83-c150-4e11-b639-3ce49686becc",
"client-request-id": "2a24be83-c150-4e11-b639-3ce49686becc"
}
}
}

答案1

得分: 0

应用程序未在我们的商店中注册”错误通常发生在您尚未注册 Azure AD 应用程序时。

最初,我遇到了如下相同的错误:

GET https://graph.microsoft.com/v1.0/communications/calls

获取 /communications/calls Microsoft Graph 终端点返回错误 7503

要从 Teams 中获取通话记录,请检查以下:

创建了一个 Azure AD 应用程序 并授予了 Calls.Initiate.All 应用程序权限的管理员同意:

获取 /communications/calls Microsoft Graph 终端点返回错误 7503

要解决此错误,尝试以无用户方式生成访问令牌,如下所示:

https://login.microsoftonline.com/TenantID/oauth2/v2.0/token

client_id:ClientID
client_secret:ClientSecret
scope:https://graph.microsoft.com/.default
grant_type:client_credentials

获取 /communications/calls Microsoft Graph 终端点返回错误 7503

通过使用上述访问令牌,我能够获取通话记录,如下所示:

GET https://graph.microsoft.com/v1.0/communications/calls

获取 /communications/calls Microsoft Graph 终端点返回错误 7503

输出:

HTTP/1.1 200 OK
Content-Type: application/json

{
  "OData.type": "#microsoft.graph.call",
  "state": "established",
  "direction": "outgoing",
  "callbackUri": "https://bot.contoso.com/callback",
  "source": {
    "OData.type": "#microsoft.graph.participantInfo",
    "identity": {
      "OData.type": "#microsoft.graph.identitySet",
      "application": {
        "OData.type": "#microsoft.graph.identity",
        "displayName": "test",
        "id": "xxxxx"
      }
    },
    "region": null,
    "languageId": null
  },
  "targets": [
    {
      "OData.type": "#microsoft.graph.invitationParticipantInfo",
      "identity": {
        "OData.type": "#microsoft.graph.identitySet",
        "user": {
          "OData.type": "#microsoft.graph.identity",
          "displayName": "ruk",
          "id": "xxx"
        }
      }
    }
  ],
  "requestedModalities": [
    "audio"
  ],
  "mediaConfig": {
    "OData.type": "#microsoft.graph.serviceHostedMediaConfig",
    "preFetchMedia": [
     {
       "uri": "https://xxxx",
       "resourceId": "xxxxx"
     },
     {
       "uri": "https://xxxx",
       "resourceId": "xxxx"
     }
    ],
  },
  "myParticipantId": "xxxx",
  "id": "xxxx",
  "OData.context": "https://graph.microsoft.com/v1.0/$metadata#communications/calls/$entity",
  "subject": null,
  "ringingTimeoutInSeconds": null,
  "resultInfo": null,
  "answeredBy": null,
  "chatInfo": null,
  "meetingInfo": null,
  "transcription": null,
  "toneInfo": null
}

如果仍然出现错误,请将应用程序注册为 机器人 并尝试,因为只有注册为机器人的应用程序才能调用此 API。参考这里

参考资料:

英文:

The error "Application is not registered in our store" usually occurs if you have not registered Azure AD Application.

Initially, I got the same error as below:

GET https://graph.microsoft.com/v1.0/communications/calls

获取 /communications/calls Microsoft Graph 终端点返回错误 7503

To fetch the calls from teams, check the below:

Created an Azure AD Application and grant Admin consent to the Calls.Initiate.All Application permission:

获取 /communications/calls Microsoft Graph 终端点返回错误 7503

To resolve the error, try to generate the access token without a user like below:

https://login.microsoftonline.com/TenantID/oauth2/v2.0/token

client_id:ClientID
client_secret:ClientSecret
scope:https://graph.microsoft.com/.default
grant_type:client_credentials

获取 /communications/calls Microsoft Graph 终端点返回错误 7503

By using the above access token, I am able to fetch call like below:

GET https://graph.microsoft.com/v1.0/communications/calls

获取 /communications/calls Microsoft Graph 终端点返回错误 7503

Output:

HTTP/1.1 200 OK
Content-Type: application/json

{
  "@odata.type": "#microsoft.graph.call",
  "state": "established",
  "direction": "outgoing",
  "callbackUri": "https://bot.contoso.com/callback",
  "source": {
    "@odata.type": "#microsoft.graph.participantInfo",
    "identity": {
      "@odata.type": "#microsoft.graph.identitySet",
      "application": {
        "@odata.type": "#microsoft.graph.identity",
        "displayName": "test",
        "id": "xxxxx",
      }
    },
    "region": null,
    "languageId": null
  },
  "targets": [
    {
      "@odata.type": "#microsoft.graph.invitationParticipantInfo",
      "identity": {
        "@odata.type": "#microsoft.graph.identitySet",
        "user": {
          "@odata.type": "#microsoft.graph.identity",
          "displayName": "ruk",
          "id": "xxx"
        }
      }
    }
  ],
  "requestedModalities": [
    "audio"
  ],
  "mediaConfig": {
    "@odata.type": "#microsoft.graph.serviceHostedMediaConfig",
    "preFetchMedia": [
     {
       "uri": "https://xxxx",
       "resourceId": "xxxxx"
     },
     {
       "uri": "https://xxxx",
       "resourceId": "xxxx"
     }
    ],
  },
  "myParticipantId": "xxxx",
  "id": "xxxx",
  "@odata.context": "https://graph.microsoft.com/v1.0/$metadata#communications/calls/$entity",
  "subject": null,
  "ringingTimeoutInSeconds": null,
  "resultInfo": null,
  "answeredBy": null,
  "chatInfo": null,
  "meetingInfo": null,
  "transcription": null,
  "toneInfo": null
}

If still the error occurs, the register the application as bot and try as this API can only be called from an application that is registered as a bot. Refer this.

References:

Microsoft Graph Call API Error - Application is not registered in our store - SharePoint Stack Exchange by Dhruvil Prajapati.

microsoft graph api - Errorcode 7503 - Application is not registered in our store - Stack Overflow by Florian Kerzel

huangapple
  • 本文由 发表于 2023年7月7日 00:23:31
  • 转载请务必保留本文链接:https://go.coder-hub.com/76630817.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定