简体   繁体   English

Microsoft Azure AD Graph API:获取用户的按比例分配的许可证信息

[英]Microsoft Azure AD Graph API: Fetch pro-rated license informations of users

I have been going through the api docs of Microsoft Azure AD Graph API and am unable to find a way to fetch the prorated licenses of a user. 我一直在浏览Microsoft Azure AD Graph API的api文档,无法找到一种方法来获取用户的按比例分配的许可证。

The problem is that the api only returns the skuids when asked for all the licenses attached to a user. 问题在于,仅当要求提供附加到用户的所有许可证时,api才会返回skuid。

For eg https://graph.windows.net/#TENANTID#/users/#USERPRINCIPALNAME#/licenseDetails?api-version=1.6 例如,例如https://graph.windows.net/#TENANTID#/users/#USERPRINCIPALNAME#/licenseDetails?api-version=1.6

"value": [
    {
        "objectId": "VdVcDxIjW0WEg5x0-5H2jbAFlEuId2hFrdGZYU5hO2k",
        "servicePlans": [
            {
                "servicePlanId": "88882e1d05-acd1-4ccb-8708-6ee036647",
                "servicePlanName": "INTUNE_O365",
                "provisioningStatus": "PendingActivation",
                "appliesTo": "Company"
            },
            {
                "servicePlanId": "1209af7827-d63c-4b61-89c3-182f06f82c",
                "servicePlanName": "EXCHANGE_S_STANDARD",
                "provisioningStatus": "Success",
                "appliesTo": "Company"
            }
        ],
        "skuId": "67buyt0-7788-4568-add1-99614e6ty89",
        "skuPartNumber": "EXCHANGESTANDARD"
    }
]

We will be able to identify the tenant subscribed skus from the request https://graph.windows.net/#TENANTID#/subscribedSkus?api-version=1.6 我们将能够从请求https://graph.windows.net/#TENANTID#/subscribedSkus?api-version=1.6中识别出租户订阅的skus

However we cannot figure out when a license(sku) was added/removed to a user. 但是,我们无法确定何时向用户添加/删除了许可证(sku)。 Is such functionality possible via the AADGraph REST API? 通过AADGraph REST API可以实现这种功能吗?

As far as I known, if you want to add or remove the license from a user, you can use this Azure AD Graph API : 据我所知,如果要向用户添加或删除许可证,则可以使用以下Azure AD Graph API:

Method : Post

Endpoint : https://graph.windows.net/myorganization/users/{user_id}/assignLicense?api-version

For more details, please refer to the document . 有关更多详细信息,请参阅文档

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 是否可以通过Azure AD Graph API或Microsoft Graph API在租户中获取所有用户信息? - Is it possible to get all the user informations in a tenant by Azure AD Graph API or Microsoft Graph API? 在Azure AD中为访客用户绘制API请求 - Graph API requests for guest users in Azure AD Azure AD Graph API 和 Microsoft Graph API 有什么区别 - What is the difference between Azure AD Graph API and Microsoft Graph API 如何发布Azure AD Graph API或Microsoft Graph API中的更新 - How updates in Azure AD Graph API or Microsoft Graph API are released 带有外部帐户和Microsoft Graph API的Azure AD - Azure AD with external accounts and Microsoft Graph API 图谱API从Azure AD获取用户 - Graph API get users from Azure AD Microsoft Graph Toolkit 对于某些 Azure AD 用户没有结果匹配 - Microsoft Graph Toolkit no have result match for some of the Azure AD users Azure AD 用户不会自动移动到许可证组 - Azure AD users are not moving to license group automatically 无法使用 Microsoft Graph 登录 Azure AD 租户的用户 - Cannot get signed in users of Azure AD tenant using Microsoft Graph 如何使用microsoft graph api为azure ad中的用户分配角色 - How to use microsoft graph api for assigning role to the user in azure ad
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM