다음을 통해 공유


조직 프로필 가져오기

적용 대상: 파트너 센터 | 21Vianet에서 운영되는 파트너 센터 | Microsoft Cloud for US Government 파트너 센터

파트너의 organization 프로필을 나타내는 개체를 가져옵니다.

필수 구성 요소

  • 자격 증명(파트너 센터 인증에서 설명). 이 시나리오는 앱 + 사용자 자격 증명을 사용한 인증만 지원합니다.

C#

organization 프로필을 얻으려면 IAggregatePartner.Profiles 컬렉션을 사용하고 OrganizationProfile 속성을 호출합니다. 마지막으로 Get() 또는 GetAsync() 메서드를 호출합니다.

// IAggregatePartner partnerOperations;

OrganizationProfile organizationProfile = partnerOperations.Profiles.OrganizationProfile.Get();

샘플: 콘솔 테스트 앱. 프로젝트: PartnerCenterSDK.FeaturesSamples 클래스: GetOrganizationProfile.cs

Java

파트너 센터 Java SDK를 사용하여 파트너 센터 리소스를 관리할 수 있습니다. 파트너 커뮤니티에서 유지 관리하고 Microsoft에서 공식적으로 지원하지 않는 오픈 소스 프로젝트입니다. 문제가 발생한 경우 커뮤니티에서 도움을 받거나GitHub에서 문제를 열 수 있습니다.

organization 프로필을 얻으려면 IAggregatePartner.getProfiles 함수를 사용하고 getOrganizationProfile 함수를 호출합니다. 마지막으로 get() 함수를 호출합니다.

// IAggregatePartner partnerOperations;

OrganizationProfile organizationProfile = partnerOperations.getProfiles().getOrganizationProfile().get();

PowerShell

파트너 센터 PowerShell 모듈을 사용하여 파트너 센터 리소스를 관리할 수 있습니다. 파트너 커뮤니티에서 유지 관리하고 Microsoft에서 공식적으로 지원하지 않는 오픈 소스 프로젝트입니다. 문제가 발생한 경우 커뮤니티에서 도움을 받거나GitHub에서 문제를 열 수 있습니다.

organization 프로필을 얻으려면 Get-PartnerOrganizationProfile 명령을 실행합니다.

Get-PartnerOrganizationProfile

REST 요청

요청 구문

방법 요청 URI
GET {baseURL}/v1/profiles/organization HTTP/1.1

요청 헤더

자세한 내용은 파트너 센터 REST 헤더를 참조하세요.

요청 본문

없음

요청 예제

GET https://api.partnercenter.microsoft.com/v1/profiles/organization HTTP/1.1
Authorization: Bearer <token>
Accept: application/json
MS-RequestId: b85cb7ab-cc2e-4966-93f0-cf0d8377a93f
MS-CorrelationId: 1bb03149-88d2-4bc2-9cc1-d6e83890fa9e

REST 응답

성공하면 이 메서드는 응답 본문에 OrganizationProfile 개체를 반환합니다.

응답 성공 및 오류 코드

각 응답에는 성공 또는 실패와 추가 디버깅 정보를 나타내는 HTTP 상태 코드가 함께 제공됩니다. 네트워크 추적 도구를 사용하여 이 코드, 오류 유형 및 추가 매개 변수를 읽을 수 있습니다. 전체 목록은 오류 코드를 참조하세요.

응답 예제

HTTP/1.1 200 OK
Content-Length: 648
Content-Type: application/json; charset=utf-8
MS-CorrelationId: 1bb03149-88d2-4bc2-9cc1-d6e83890fa9e
MS-RequestId: b85cb7ab-cc2e-4966-93f0-cf0d8377a93f
Date: Tue, 22 Mar 2016 17:11:06 GMT

{
    "id":<id>,
    "companyName":"TEST_TEST_BugBash1",
    "defaultAddress":{
        "country":"US",
        "city":"Redmond",
        "state":"WA",
        "addressLine1":"Two Microsoft Way",
        "addressLine2":"",
        "postalCode":"98052",
        "firstName":"Test",
        "lastName":"Account",
        "phoneNumber":""
    },
    "tenantId":<tenantID>,
    "domain":"testtestbugbash1.onmicrosoft.com",
    "email":"test-partner@microsoft.com",
    "language":"es",
    "culture":"es-US",
    "profileType":"OrganizationProfile",
    "links":{
        "self":{
            "uri":"/profiles/organization",
            "method":"GET",
            "headers":[]
        }
    },
    "attributes":{
        "etag":<etag>,
        "objectType":"OrganizationProfile"
    }
}