我们正在尝试确定最新的UCWA或UCMA是否支持 Skype for Business Online。找了很久,看到有人在2015年3月/4月发帖,说UCMA/UCWA还不支持。但后来,我找不到任何关于此的信息。
- 最新版本能支持吗?
- 我在哪里可以找到有关此的任何信息?
UCWA 现在可用于 Skype for Business Online。注册和验证 UCWA 应用程序的步骤与使用 UCWA for Skype for Business Server 完全不同,但一旦你登录,实际的 API 几乎是相同的。目前,UCWA 的 Skype for Business Online 版本的功能比 Skype for Business Server 版本的功能略少——例如,可以发送但不能接收消息——尽管这应该很快就会改变。
由于本问答中解释的原因,UCMA 不适用于 Skype for Business Online 。
Skype for Business Online 使用 Azure AD 进行身份验证,您可以通过 ADAL.net 库使用用户名和密码对其进行身份验证。
我创建了一个示例 .NET 控制台应用程序,该应用程序 使用 UCWA 以及用户名和密码身份验证登录 Skype for Business Online。它适用于许多简单的场景。
在开始以下步骤之前,用户必须在 Azure AD 中注册应用程序并授予对必要 API 的所有访问权限并收集
从 PostMan 扩展:可以按照以下步骤在 Skype For Business (SFB) 上使用 UCWA 在线会议:
Step1 > 获取用户token
1) request in Only IE browser
https://login.microsoftonline.com/88****-da69-4e7d-a5dc-b3a*****1d/oauth2/authorize?
response_type=code
&client_id=6e****44-2**3-4**2-8**c-e*******e72
&client_secret=bdjmKq**************************nQMtbzA=
&resource=https://webdirin1.online.lync.com (This url should be used for user)
2) Post request token with code
https://login.windows.net/88****-da69-4e7d-a5dc-b3a*****1d/oauth2/token
grant_type=authorization_code
&client_id=6e****44-2**3-4**2-8**c-e*******e72
&code=AQABAAIAAABnfiG-mA6NTae7CdWW7Qfda84eiCww0aSunFfvkaLq3OJZBDzX6*****97HQl****dsK53_7iM8Bq_qXWuH6M8TqPu5Py51eSB2QuhQyYcZv_28I36FC7ODudIp9_8zsxUmOKJbZXvDiEk0YjDkfacW2homgolt4mZ-E05_D4j77Gp3b1K0f7yuZbHPFjkvloIvOhPWYT953uIrJvj6Tm8zmTPpcAJeusuilXJAJS3Pl19o7zBwFBJ4EtkK06HsA_uGAZnrD2-0vxWadcUWv-fzijVCtEE9yZGGj6a0SQwu6XKdhunS7waAsKFAjDhJ6fP431pkWoD5mDRtXvz6riYMTLYRNjTS6UWyX2oBNO0DhoNXHG95YAoGDgftBvaUpI9*****ZIFPDUTPcYSRiYcMKF21ILCy1I_scXGmL1QtE1MSQjsu6c1lGZhVqzMEWHX57wcRiEHCTAlao-3fJm-KvYQn1DqiX3tJDkx0cmAEwr6iCeM37QEBKD-PZ0CAUrIY9uwXenaxkunoD_XG5YDuE2in4BcJiDwEccaFh0BdmQXEqln-pd9QgAA&session_state=0b92ca54-cd08-4a28-9f20-216245e289f0
&redirectUri=http://localhost/TServ
&resource=https://webdirin1.online.lync.com
&client_secret=bdjmKq**************************nQMtbzA=
步骤 2>获取应用程序 URL:
Request:
URL:https://webdirin1.online.lync.com/Autodiscover/AutodiscoverService.svc/root/oauth/user
Authorization: Bearer <Previous access code>
Response:
{
"_links": {
"self": {
"href": "https://webpoolmaain***.infra.lync.com/Autodiscover/AutodiscoverService.svc/root/oauth/user"
},
"applications": {
"href": "https://webpoolmaain***.infra.lync.com/ucwa/oauth/v1/applications",
"revision": "2"
},
"xframe": {
"href": "https://webpoolmaain***.infra.lync.com/Autodiscover/XFrame/XFrame.html"
}
}
}
Step 3>获取申请token
1) request in Only IE browser
https://login.microsoftonline.com/88****-da69-4e7d-a5dc-b3a*****1d/oauth2/authorize?
response_type=code
&client_id=6e****44-2**3-4**2-8**c-e*******e72
&client_secret=bdjmKq**************************nQMtbzA=
&resource=https://webpoolmaain***.infra.lync.com (this resource url is the application url got it from Step 2)
response http://localhost/TServ/?code=AQABAAIAAABnfiG-mA6NTae7CdWW7QfdAe8KrUbxREZpqyau_gGtw4QSTzq5MHmALQQa_n_AvVeK0iMRaESOZMkuGJ1a3bvWEYpMTHOyGfT2r9T8WbeSW7vJR-6Upnv6qI-nrT3kM8jXRni2V9S_y6xibRwDAE160XYeu9aJkbAE9Wq4HquYSUkC1bcNZSqmpubv2MiixMcjwL00YP8c53bRu44yWXr1FWr5Rgnc8VbnoZyxJF7CgfbTOrfDusXeLHj7OGGevyh8ZsKXYxJh9CrZ0u1NyGJgeGPFxDJbUxfkli49MW1x-Lbf2qhdPCN10b_nq3s5YD92Pk_S6mAtfmrVpTalEeHfSBTMqxAVtf3nc6f4QbQvTZx988HoQ_gHLLt_4J9trYTPA-OEmLUvmgu9DQHTpCAg_ACEPvi7bmMkBxtLo7tQp6fSXBUZ5p6buBqNYzPFs8b_BGodkRKU_hDqWbFc-nmHfx7qYmW1gVNB1G9LvfHGVqiNUg3KJBjcmonwKcu-JoYNIucd9xop15OtsBuusLEY8sEVstq9bIYyIw8__xH56MKh7wJTV_cm52qSq4E_d4ogAA&session_state=abe98e32-ffc7-4ed5-94d1-e894ed53d52d
2) post request token with code
https://login.windows.net/88****-da69-4e7d-a5dc-b3a*****1d/oauth2/token
grant_type=authorization_code
&client_id=6e****44-2**3-4**2-8**c-e*******e72 &code=AQABAAIAAABnfiG-mA6**********************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************37QEBKD-PZ0CAUrIY9uwXenaxkunoD_XG5YDuE2in4BcJiDwEccaFh0BdmQXEqln-pd9QgAA&session_state=0b92ca54-cd08-4a28-9f20-216245e289f0
&redirectUri=http://localhost/TServ
&resource=https://webpoolmaain***.infra.lync.com
&client_secret=bdjmKq**************************nQMtbzA=
response
{
"token_type": "Bearer",
"scope": "Contacts.ReadWrite Conversations.Initiate Conversations.Receive Meetings.ReadWrite User.ReadWrite",
"expires_in": "3599",
"ext_expires_in": "0",
"expires_on": "1493981291",
"not_before": "1493977391",
"resource": "https://webpoolmaain***.infra.lync.com",
"access_token": "eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiIsIng1dCI6InowMzl6ZHNGdWl6cEJmQlZLMVRuMjVRSFlPMCIsImtpZCI6InowMzl6ZHNGdWl6cEJmQlZLMVRuMjVRSFlPMCJ9.eyJhdWQiOiJodHRwczovL3dlYnBvb2xtYWFpbjEwMi5pbmZyYS5seW5jLmNvbSIsImlzcyI6Imh0dHBzOi8vc3RzLndpbmRvd3MubmV0Lzg4MzU2ZGFjLWRhNjktNGU3ZC1hNWRjLWIzYWM1MzM0MWUxZC8iLCJpYXQiOjE0OTM5NzczOTEsIm5iZiI6MTQ5Mzk3NzM5MSwiZXhwIjoxNDkzOTgxMjkxLCJhY3IiOiIxIiwiYWlvIjoiWTJaZ1lEQXFTWGsrNGVEV3RiRmYyR01ZQmU4ZEZJN1A3UkpQWlRxVjdmRmNPZVRCdFJZQSIsImFtciI6WyJwd2QiXSwiYXBwaWQiOiI2ZTcxZGI0NC0yYjgzLTQ1YTItODcxYy1lY****************************************************************************************************************************************************************************************************************************************************************************************************************************************5ncy5SZWFkV3JpdGUgVXNlci5SZWFkV3JpdGUiLCJzdWIiOiJyZEF3Ql9XTjNQZlRaTEJaMmNfSmlEQ0QwVVFCNWZ0R0Y0Sk5JR25qZjRzIiwidGlkIjoiODgzNTZkYWMtZGE2OS00ZTdkLWE1ZGMtYjNhYzUzMzQxZTFkIiwidW5pcXVlX25hbWUiOiJnb3BhbHJlZGR5QHRlbHBzZ2Nsb3VkLm9ubWljcm9zb2Z0LmNvbSIsInVwbiI6ImdvcGFscmVkZHlAdGVscHNnY2xvdWQub25taWNyb3NvZnQuY29tIiwidmVyIjoiMS4wIn0.BpPYsoUFp4zJQo9Iwllq8bOskKxHom2m9Fw4PXgwZraAfF-LopT54AyNLzfVhjdODbLETl4FnJn140M0pasUI5rMEXYFN2byzusNW3OHojlWbJ5-WpHj8NlQPE02oCwZ81MDqhV1eKjs34rp42F_tQZFXevBJYSMZRATtz4chtQnkzLhJ_c5p4MNmAcA7sdho9kaPUF45tj8bWF9n7ktrD8w2-r0DddKyUW5YXa_pOJzQp4GucoCKBOkIYS85OaAuFe4_kiQOG_dfm1s_HPat4BMyZxMFNuocD0ai-6t7ug7KZ-CK63aqLE9mK9sQSKx9uDo5TOO0-5-FDIIP9eNLA",
"refresh_token": "AQABAAAAAABnfiG-mA6NTae7CdWW7Qfd2CWLGkoBoN9_yp-MKWaBRNCnAjH_YPC3YvbLUuGyKI4dzd4Y3W7y7-q7529kXaVLYIKDOISVtEKX-oHbNGjB4i2HdBXJpdWoiQsZiA2L7ZszaNevz06qUl5lqZjgzx3Lp5imPOyd0Ib_6****************************************************************************************************************************************************************************************************************************************************************************************************************************************Dpj4JIEjcWW8dDm-iplSLM4XpZJWvQ0hJDijkCOKxlg6Pab88I4YBwcrn1D5e1cS2tX3kVpGMBCN5YfRFHrET98293hd9Y88EmI1AFak3xoMOGPLePwH2C_gp2G-IiLLicNehvBdIAA",
"id_token": "eyJ0eXAiOiJ****************************************************************************************************************************************************************************************************************************************************************************************************************************************eXRTQ0pJRlNNcWxIRWs3Q3RSODBwTW5XMk1rIiwidGlkIjoiODgzNTZkYWMtZGE2OS00ZTdkLWE1ZGMtYjNhYzUzMzQxZTFkIiwidW5pcXVlX25hbWUiOiJnb3BhbHJlZGR5QHRlbHBzZ2Nsb3VkLm9ubWljcm9zb2Z0LmNvbSIsInVwbiI6ImdvcGFscmVkZHlAdGVscHNnY2xvdWQub25taWNyb3NvZnQuY29tIiwidmVyIjoiMS4wIn0."
}
步骤 4>获取应用程序资源 url:
Request Type: Post
URL :https://webpoolmaain***.infra.lync.com/ucwa/oauth/v1/applications
Headers:
Authorization: Bearer <access code from Step 3.2>
Accept: application/json
Content-Type: application/json
Body:
{
"UserAgent":"UCWASamples",
"EndpointId":"88356dac-da69-4e7d-a5dc-b3ac53341e1d",
"Culture":"en-US"
}
Response:
{
"culture": "en-US",
"userAgent": "UCWASamples",
"type": "Browser",
"endpointId": "88356dac-da69-4e7d-a5dc-b3ac53341e1d",
"instanceId": "default",
"id": "10666478063",
"_links": {
"self": {
"href": "/ucwa/oauth/v1/applications/10666478063"
},
"policies": {
"href": "/ucwa/oauth/v1/applications/10666478063/policies"
},
"batch": {
"href": "/ucwa/oauth/v1/applications/10666478063/batch"
},
"events": {
"href": "/ucwa/oauth/v1/applications/10666478063/events?ack=1&key=c2lwOmdvcGFscmVkZHlAdGVscHNnY2xvdWQub25taWNyb3NvZnQuY29t-10666478063-ZGVmYXVsdA%3D%3D"
}
},
"_embedded": {
"me": {
"uri": "sip:g*******y@t*******d.onmicrosoft.com",
"name": "G**********y",
"emailAddresses": [
"g*******y@t*******d.onmicrosoft.com"
],
"_links": {
"self": {
"href": "/ucwa/oauth/v1/applications/10666478063/me"
},
"makeMeAvailable": {
"href": "/ucwa/oauth/v1/applications/10666478063/me/makeMeAvailable",
"revision": "2"
},
"photo": {
"href": "/ucwa/oauth/v1/applications/10666478063/photos/g*******y@t*******d.onmicrosoft.com"
}
},
"rel": "me"
},
"people": {
"_links": {
"self": {
"href": "/ucwa/oauth/v1/applications/10666478063/people"
},
"presenceSubscriptions": {
"href": "/ucwa/oauth/v1/applications/10666478063/people/presenceSubscriptions"
},
"subscribedContacts": {
"href": "/ucwa/oauth/v1/applications/10666478063/people/subscribedContacts"
},
"presenceSubscriptionMemberships": {
"href": "/ucwa/oauth/v1/applications/10666478063/people/presenceSubscriptionMemberships"
},
"myGroups": {
"href": "/ucwa/oauth/v1/applications/10666478063/people/groups",
"revision": "2"
},
"myGroupMemberships": {
"href": "/ucwa/oauth/v1/applications/10666478063/people/groupMemberships",
"revision": "2"
},
"myContacts": {
"href": "/ucwa/oauth/v1/applications/10666478063/people/contacts"
},
"myPrivacyRelationships": {
"href": "/ucwa/oauth/v1/applications/10666478063/people/privacyRelationships"
},
"myContactsAndGroupsSubscription": {
"href": "/ucwa/oauth/v1/applications/10666478063/people/contactsAndGroupsSubscription"
},
"search": {
"href": "/ucwa/oauth/v1/applications/10666478063/people/search",
"revision": "2"
}
},
"rel": "people"
},
"onlineMeetings": {
"_links": {
"self": {
"href": "/ucwa/oauth/v1/applications/10666478063/onlineMeetings"
},
"myOnlineMeetings": {
"href": "/ucwa/oauth/v1/applications/10666478063/onlineMeetings/myOnlineMeetings"
},
"onlineMeetingDefaultValues": {
"href": "/ucwa/oauth/v1/applications/10666478063/onlineMeetings/defaultValues"
},
"onlineMeetingEligibleValues": {
"href": "/ucwa/oauth/v1/applications/10666478063/onlineMeetings/eligibleValues"
},
"onlineMeetingInvitationCustomization": {
"href": "/ucwa/oauth/v1/applications/10666478063/onlineMeetings/customInvitation"
},
"onlineMeetingPolicies": {
"href": "/ucwa/oauth/v1/applications/10666478063/onlineMeetings/policies"
},
"phoneDialInInformation": {
"href": "/ucwa/oauth/v1/applications/10666478063/onlineMeetings/phoneDialInInformation"
}
},
"rel": "onlineMeetings"
},
"communication": {
"videoBasedScreenSharing": "Enabled",
"6845cfcf-c21f-4187-8d43-5***e57811a5": "please pass this in a PUT request",
"supportedModalities": [],
"supportedMessageFormats": [
"Plain"
],
"audioPreference": "PhoneAudio",
"publishEndpointLocation": true,
"_links": {
"self": {
"href": "/ucwa/oauth/v1/applications/10666478063/communication"
},
"mediaRelayAccessToken": {
"href": "/ucwa/oauth/v1/applications/10666478063/communication/mediaRelayAccessToken"
},
"mediaPolicies": {
"href": "/ucwa/oauth/v1/applications/10666478063/mediaPolicies"
},
"conversations": {
"href": "/ucwa/oauth/v1/applications/10666478063/communication/conversations?filter=active"
},
"startMessaging": {
"href": "/ucwa/oauth/v1/applications/10666478063/communication/messagingInvitations",
"revision": "2"
},
"startAudioVideo": {
"href": "/ucwa/oauth/v1/applications/10666478063/communication/audioVideoInvitations",
"revision": "2"
},
"startOnlineMeeting": {
"href": "/ucwa/oauth/v1/applications/10666478063/communication/onlineMeetingInvitations?onlineMeetingUri=adhoc"
},
"joinOnlineMeeting": {
"href": "/ucwa/oauth/v1/applications/10666478063/communication/onlineMeetingInvitations"
},
"missedItems": {
"href": "/ucwa/oauth/v1/applications/10666478063/communication/missedItems"
}
},
"rel": "communication",
"etag": "11133050"
}
},
"rel": "application",
"etag": "3184910031",
"expires": "/Date(1494266184733)/"
}
步骤 5>创建在线会议:
Request Type: Post
URL :https://webpoolmaain***.infra.lync.com/ucwa/oauth/v1/applications/10666478063/onlineMeetings/myOnlineMeetings
Headers:
Authorization: Bearer <access code from Step 3.2>
Content-Type: application/json
Body:
{
"accessLevel" : "Everyone",
"attendanceAnnouncementsStatus":"Disabled",
"description":"hey guys let's do a musical!",
"subject":"Party Time",
"attendees": ["sip:vetrivels@t*******d.onmicrosoft.com","sip:g*******y@t*******d.co.in"],
"leaders": []
}
Response:
{
"accessLevel": "Everyone",
"entryExitAnnouncement": "Disabled",
"attendees": [
"sip:vetrivels@t*******d.onmicrosoft.com",
"sip:g*******y@t*******d.co.in"
],
"automaticLeaderAssignment": "Disabled",
"description": "hey guys let's do a musical!",
"leaders": [],
"onlineMeetingId": "JEHFP54F",
"onlineMeetingUri": "sip:g*******y@t*******d.onmicrosoft.com;gruu;opaque=app:conf:focus:id:JEHFP54F",
"legacyOnlineMeetingUri": "conf:sip:g*******y@t*******d.onmicrosoft.com;gruu;opaque=app:conf:focus:id:JEHFP54F?conversation-id=JEHFP54F",
"onlineMeetingRel": "myOnlineMeetings",
"organizerUri": "sip:g*******y@t*******d.onmicrosoft.com",
"phoneUserAdmission": "Disabled",
"lobbyBypassForPhoneUsers": "Disabled",
"subject": "Party Time",
"joinUrl": "https://meet.lync.com/t*******d/g*******y/JEHFP54F",
"6845cfcf-c21f-4187-8d43-5***e57811a5": "please pass this in a PUT request",
"_links": {
"self": {
"href": "/ucwa/oauth/v1/applications/10666478063/onlineMeetings/myOnlineMeetings/JEHFP54F"
},
"onlineMeetingExtensions": {
"href": "/ucwa/oauth/v1/applications/10666478063/onlineMeetings/myOnlineMeetings/JEHFP54F/extensions"
}
},
"rel": "myOnlineMeeting",
"etag": "3135154093"
}
您有以下范围: