編輯

共用方式為


List organizations

Namespace: microsoft.graph

Important

APIs under the /beta version in Microsoft Graph are subject to change. Use of these APIs in production applications is not supported. To determine whether an API is available in v1.0, use the Version selector.

Retrieve a list of organization objects. There's only one organization object in the collection.

This API is available in the following national cloud deployments.

Global service US Government L4 US Government L5 (DOD) China operated by 21Vianet

Permissions

One of the following permissions is required to call this API. To learn more, including how to choose permissions, see Permissions.

Permission type Permissions (from least to most privileged)
Delegated (work or school account) User.Read, Organization.Read.All, Directory.Read.All, Organization.ReadWrite.All, Directory.ReadWrite.All
Delegated (personal Microsoft account) Not supported.
Application Organization.Read.All, Directory.Read.All, Organization.ReadWrite.All, Directory.ReadWrite.All

Applications granted the User.Read permission are able to read only the id, displayName, and verifiedDomains properties of the organization. All other properties return with null values. To read all properties, use at least Organization.Read.All.

In delegated scenarios with work or school accounts, the signed-in user must be assigned a supported Microsoft Entra role or a custom role with a supported role permission. The following least privileged roles are supported for this operation.

  • AdHoc License Administrator
  • Application Administrator
  • Authentication Administrator
  • Azure Information Protection Administrator
  • Azure Information Protection Administrator
  • Billing Administrator
  • Cloud Application Administrator
  • Compliance Data Administrator
  • Customer LockBox Access Approver
  • Customer LockBox Access Approver
  • Desktop Analytics Administrator
  • Directory Readers
  • Directory Reviewer
  • Directory Synchronization Accounts - for Microsoft Entra Connect and Microsoft Entra Cloud Sync services
  • Directory Writers
  • Dynamics 365 Administrator
  • Dynamics 365 Administrator
  • Global Reader
  • Guest User
  • Helpdesk Administrator
  • Hybrid Identity Administrator
  • Insights Administrator
  • Kaizala Administrator
  • License Administrator
  • Mailbox Administrator
  • Microsoft Managed Desktop Administrator
  • Microsoft Store for Business User
  • Modern Commerce Administrator
  • Power BI Administrator
  • Power BI Administrator
  • Privileged Authentication Administrator
  • Privileged Role Administrator
  • Restricted Guest User
  • Security Administrator
  • Security Operator
  • Security Reader
  • Service Support Administrator
  • Teams Administrator
  • Teams Communications Administrator
  • Teams Communications Support Engineer
  • Teams Communications Support Specialist
  • User
  • User Administrator
  • Volume Licensing Business Center User
  • Volume Licensing Service Center User

HTTP request

GET /organization

Optional query parameters

This method supports the $select OData query parameter to help customize the response.

Request headers

Name Type Description
Authorization string Bearer {token}. Required. Learn more about authentication and authorization.

Request body

Don't supply a request body for this method.

Response

If successful, this method returns a 200 OK response code and collection of organization objects in the response body. Only one object is returned in the collection.

Example

Request

The following example shows a request.

GET https://graph.microsoft.com/beta/organization
Response

The following example shows the response.

Note: The response object shown here might be shortened for readability.

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

{
    "@odata.context": "https://graph.microsoft.com/beta/$metadata#organization",
    "value": [
        {
            "id": "84841066-274d-4ec0-a5c1-276be684bdd3",
            "deletedDateTime": null,
            "businessPhones": [
                "425-555-0100"
            ],
            "city": null,
            "country": null,
            "countryLetterCode": "NL",
            "createdDateTime": "2021-08-02T10:30:06Z",
            "defaultUsageLocation": "String",
            "displayName": "Contoso",
            "isMultipleDataLocationsForServicesEnabled": null,
            "marketingNotificationEmails": [],
            "onPremisesLastPasswordSyncDateTime": "2021-08-02T10:30:06Z",
            "onPremisesLastSyncDateTime": null,
            "onPremisesSyncEnabled": null,
            "partnerTenantType": "ResellerPartnerDelegatedAdmin",
            "postalCode": null,
            "preferredLanguage": "en",
            "securityComplianceNotificationMails": [],
            "securityComplianceNotificationPhones": [],
            "state": null,
            "street": null,
            "technicalNotificationMails": [
                "admin@contoso.com"
            ],
            "tenantType": "AAD",
            "directorySizeQuota": {
                "used": 698,
                "total": 50000
            },
            "assignedPlans": [
                {
                    "assignedDateTime": "2022-04-03T02:46:42Z",
                    "capabilityStatus": "Deleted",
                    "service": "Adallom",
                    "servicePlanId": "932ad362-64a8-4783-9106-97849a1a30b9"
                },
                {
                    "assignedDateTime": "2022-04-03T02:46:42Z",
                    "capabilityStatus": "Deleted",
                    "service": "MultiFactorService",
                    "servicePlanId": "8a256a2b-b617-496d-b51b-e76466e88db0"
                },
                {
                    "assignedDateTime": "2021-08-02T10:36:57Z",
                    "capabilityStatus": "Enabled",
                    "service": "exchange",
                    "servicePlanId": "113feb6c-3fe4-4440-bddc-54d774bf0318"
                },
                {
                    "assignedDateTime": "2021-08-02T10:36:02Z",
                    "capabilityStatus": "Deleted",
                    "service": "SCO",
                    "servicePlanId": "882e1d05-acd1-4ccb-8708-6ee03664b117"
                }
            ],
            "privacyProfile": {
                "contactEmail": "",
                "statementUrl": ""
            },
            "provisionedPlans": [
                {
                    "capabilityStatus": "Deleted",
                    "provisioningStatus": "Success",
                    "service": "Adallom"
                },
                {
                    "capabilityStatus": "Enabled",
                    "provisioningStatus": "Success",
                    "service": "exchange"
                }
            ],
            "verifiedDomains": [
                {
                    "capabilities": "Email, OfficeCommunicationsOnline",
                    "isDefault": true,
                    "isInitial": true,
                    "name": "Contoso.com",
                    "type": "Managed"
                }
            ]
        }
    ]
}