is there any API in VSTS that's equivalent to IIdentityManagementService2 in TFS? I used ReadIdentity(https://msdn.microsoft.com/en-us/library/ff731745(v=vs.120).aspx) to get the email address and display name of an account alias in TFS. I am trying to do the same in VSTS, but I am not finding anything that can do similar things in its REST API or Microsoft.VisualStudio.Services.* libraries.
Yes, you can get it via Accounts and profiles in VSTS Rest API, the "Accounts" can get the accounts in the collection and the "Profiles" can get the information like Display Name, Email address for the member.
One thing you need to notice is that, to call "Accounts and profiles" API, you must use OAuth2.0 authentication.
Q: Can I use basic auth with the profiles API?
A: No, you must use OAuth.
Related
I am new to bot development. I am working on creating a MS Teams bot using bot framework. The bot will be installed in ‘Personal’ scope in Teams, and it doesn’t have any tab / messaging extension etc. Once installed, I want to get the list of all the members/ channels/ Notification updates (i.e. members added/deleted etc.). As per the different documentation, I can get the list using Graph API.
List members of team - Microsoft Graph v1.0 | Microsoft Docs
List members of a channel - Microsoft Graph v1.0 | Microsoft Docs
To achieve this, I need the token that will be passed in API. I am not sure how to implement that. I have followed the instructions mentioned in Add authentication to a bot in Bot Framework SDK - Bot Service | Microsoft Docs. There was a step to add ‘Add OAuth Connection Settings’ and there were multiple options in ‘Service Provider’. I selected ‘Azure Active Directory v2’. After doing that, it works and I can get the token, but it only works if during login, I user my azure directory credentials. I have a Microsoft account linked with my MS Teams which id different than the Azure account. A user in team can have a Microsoft account / work / office account so this needs to work for everyone so what would be the correct ‘Service Provider’ option that will work for all accounts?
I was thinking that the flow should be like:
When clicks on ‘Add’ button to install the app in Teams
Once added, bot will prompt for Graph API permission using OAuth.
Once user gives the permission, I can use the token to call graph APIs.
I have also looked at the following tutorials:
How to use Bot Framework Composer to build low-code Microsoft Teams bots (Part 1)
Get user profile information in your Microsoft Teams bot with Microsoft Graph (Part 2) - YouTube
But after performing all the steps, when I try to login, it says – ‘This action can't be performed since the app does not exist or has been uninstalled.’.
I am not getting a clear approach on how to proceed with it.
As #Maxim has also suggested, if you want to have a bot that should run multitenant you need to put tenant Id as common in OAuth Setting in Azure bot. As the value suggest it isn't going to specific to single tenant and Redirect Uri should be set to https://token.botframework.com/.auth/web/redirect in app registration.
This is it, you don't need to add anything.
This is also mention in the doc --
We have some sample around it as well that shows how to use Graph API with the bot -
https://github.com/microsoft/BotBuilder-Samples/tree/main/samples/csharp_dotnetcore/24.bot-authentication-msgraph
You can setup this one and update the Graph calls to get member of team or channels.
Is there an api endpoint to GET all sub accounts of an account? I'm trying to export the list at this location in the twilio browser console:
https://www.twilio.com/console/project/subaccounts.
Since I couldn't find a way to export it, I assumed there might be an endpoint for this data in their api, but I can't seem to find any api docs that reference sub accounts.
Here is the resource.
List All Accounts
Read the set of Accounts belonging to the Account used to make the API
request. This list includes that account, along with any subaccounts
belonging to it.
We want to export all user accounts' info from our customer's TFS online account within a minimum of account name/E-mail address.
Using REST API-- Get a list of accounts still need the member ID or owner ID.
Is it possible to get the related info only with the account name or address programmatically?
Seems you are talking about VSTS. If you want to get a list of VSTS users (and other related information), you could use below API:
get https://{Account}.vsaex.visualstudio.com/_apis/userentitlements?api-version=4.1-preview
Simply replace {Account} with your specific VSTS account name, then you will get a result as below include Displayname/MailAdress:
You could also be able to call the API with C#.
More details please refer this wonderful blog: GET A LIST OF VSTS USERS WITH APIS
I have my project in TFS that is located on visualstudio.com. But now I need to share it to few users only by only email and they do not have Microsoft account. Is it possible to get somethink like share link or read only priviliges link.
Thank you
No, they need to create a Microsoft Account. Though they can create an account for their existing email address (so that they don't get a new email account to go with it).
I am developing an application using the Asana API. As a part of which I need to display all the members of a team in an organization. When I use /organizations/organization-id/teams I get a listing of all the teams(team id and team name) and if i use /teams/team-id I get the team id, team name, and organization details(id and name).
How do I access the team members?
Try /teams/{team-id}/users - not yet publicly documented, but I suspect the endpoint won't change much before we publicly document it.