Microsoft graph api 禁止使用MS Graph API从Intune删除托管应用

Microsoft graph api 禁止使用MS Graph API从Intune删除托管应用,microsoft-graph-api,intune,Microsoft Graph Api,Intune,虽然使用graph api从Intune获取托管应用程序没有问题,但每次我尝试从Intune删除应用程序时,都会得到403个禁止 DELETE https://graph.microsoft.com/beta/deviceAppManagement/{appID} - returns 403 GET https://graph.microsoft.com/beta/deviceAppManagement/{appID} - returns 200 我已尝试在应用程序注册门户中添加应用程序,并将

虽然使用graph api从Intune获取托管应用程序没有问题,但每次我尝试从Intune删除应用程序时,都会得到403个禁止

DELETE https://graph.microsoft.com/beta/deviceAppManagement/{appID} - returns 403
GET https://graph.microsoft.com/beta/deviceAppManagement/{appID} - returns 200
我已尝试在应用程序注册门户中添加应用程序,并将其作为应用程序添加到Azure广告中。 首先,我从这里得到一个身份验证代码

https://login.microsoftonline.com/{TenantID}/oauth2/authorize?response_type=code
&redirect_uri=localhost
&client_id={MyAppID}
&resource={ "https://graph.microsoft.com"}
&prompt=admin_consent
&scope=DeviceManagementApps.ReadWrite.All
然后使用代码从这里获取jwt令牌

POST https://login.microsoftonline.com/{TenantID}/oauth2/token
-Body grant_type=authorization_code&redirect_uri={redirectURI}client_id={App/ClientID}&client_secret={App/ClientSecret}&code={MyAuthCode}&resource=https://graph.microsoft.com
然后,我使用返回的令牌调用graph api。 我也尝试过使用
common
端点,但没有效果。 我是否缺少一些需要设置的权限范围?我为应用程序设置了以下已删除的周期,并在MS演示帐户上使用管理员帐户进行im身份验证

Read and write Microsoft Intune apps (preview)
Sign in and read user profile
Read and write directory data

如果是“托管”应用程序-这些是Intune提供的内置应用程序,不能删除。如果您通过Graph API创建/删除一个标准的iOS应用商店应用程序,您能验证它是否有效吗?

Ahh非常感谢,我没有意识到只有iOStoreApp或androidStoreApp类型的应用程序才能被删除。