简体   繁体   中英

use office 365 authentication for all user

I want to use office 365 authentication for all user. if user have valid login id and password then the service gives us name of user and Login name. but i am unable to use the below service using javascript or c#. when i am calling this service from browser url it gives their login_name and password text-box in prompt(alert box). but i need to give my text-box and want to get response so that i can use as valid authentication.

https://outlook.office365.com/api/v1.0/me

The browser prompt the user name and password dialog box to authenticate the user since o365 API is RESTful API that requires a user to authenticate. To implement the same in JS or C# you need to authenticate the user and get an access token first and then call any o365 api method and the result will be returned as JSON object.

Check out Get Profile sample in o365 unified api.

Here is a url for the sandbox tool with C# and JS Samples: https://apisandbox.msdn.microsoft.com/

Hope this helps.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM