none
Skype for bussiness integration - Unauthorised Token

    Question

  • Hi,

    I am facing some error while calling API for getting the access token from Lync server

    GET https://webdir0f.online.lync.com/Autodiscover/AutodiscoverService.svc/root/oauth/user?originalDomain=enyotalearning.com

    I am getting the response as

    HTTP/1.1 401 Unauthorized
    Cache-Control: no-cache
    Content-Type: text/html
    WWW-Authenticate: Bearer trusted_issuers="00000001-0000-0000-c000-000000000000@*", client_id="00000004-0000-0ff1-ce00-000000000000", authorization_uri="https://login.windows.net/common/oauth2/authorize"
    WWW-Authenticate: MsRtcOAuth href="https://webdir0f.online.lync.com/WebTicket/oauthtoken",grant_type="urn:microsoft.rtc:passive,urn:microsoft.rtc:anonmeeting"
    X-MS-Server-Fqdn: SG20F00EDG34.infra.lync.com
    X-MS-Correlation-Id: de6d96ae-37bb-491d-9475-6b675a6f9d9d
    x-ms-client-request-id: 674988cb-5fe8-4a83-8625-8f618e360775
    Strict-Transport-Security: max-age=31536000; includeSubDomains
    X-Content-Type-Options: nosniff
    Date: Thu, 06 Sep 2018 05:48:43 GMT
    Content-Length: 1293
    
    I am getting this issue because I have not passed Access token to API.

    When I called API to get access token I am getting response as invalid grant_type as below

    POST https://webdir0f.online.lync.com/WebTicket/oauthtoken with

    grant_type=password&username=xxxxxxxxx&password=xxxxxxxxx

    Response is

    {
        "error": "unsupported_grant_type"
    }

    Also which credentials to use in above API.

    Thanks.

    Thursday, September 6, 2018 2:38 PM

All replies