Git Product home page Git Product logo

dotnetcore-console-sample's Introduction

dotnetcore-console-sample

build status for all sample projects

This repository will contain several samples showing how to interact with Microsoft Graph using the .Net core SDK. These samples have been created as part of the 30 Days of Microsoft Graph blog series. Each of the samples builds from a common base project, in order to successfully build a sample you must first complete the setup required in the base project for that application type.

Table of Contents

Console Applications

Contributing

This project welcomes contributions and suggestions. Most contributions require you to agree to a Contributor License Agreement (CLA) declaring that you have the right to, and actually do, grant us the rights to use your contribution. For details, visit https://cla.microsoft.com.

When you submit a pull request, a CLA-bot will automatically determine whether you need to provide a CLA and decorate the PR appropriately (e.g., label, comment). Simply follow the instructions provided by the bot. You will only need to do this once across all repos using our CLA.

This project has adopted the Microsoft Open Source Code of Conduct. For more information see the Code of Conduct FAQ or contact [email protected] with any additional questions or comments.

dotnetcore-console-sample's People

Contributors

baywet avatar briantjackett avatar darrelmiller avatar dependabot-preview[bot] avatar dependabot[bot] avatar gavinbarron avatar jackson-woods avatar janvidarelven avatar jasonjoh avatar microsoftopensource avatar msftgits avatar petrich-msft avatar svarukala avatar tekexpo avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

dotnetcore-console-sample's Issues

Question: how to create group with team and members?

Dear all,

could you please show an example how to create a team with a group and assign members/owners to it?

I am struggeling to create the team once the group got created:

          Team team = new Team();
			// create team from group NOT Working
            var createdTeam = await _graphServiceClient.Groups[createdGroup.Id].Team.Request().CreateAsync(team);

Error:
{Microsoft.Graph.ServiceException: Message: No HTTP resource was found that matches the request URI 'https://api.teams.skype.com/v1.0/groups('81ca5d40-975a-41be-bdbd-07228c0c3bea')/team'.

See also my question here: microsoftgraph/msgraph-sdk-dotnet#341

Thank you.

Update Day 28 Webhooks sample to .Net Core 3.1

The webhooks sample is a .Net Core Web API which differs from the console applications used for most other samples. Looking for assistance in updating due to lack of availability to work through the necessary changes.

Implement certificate based authentication for base application

Implement certificate based authentication for base console application instead of client secret. Will require additional utility to retrieve certificate. Prefer user certificate store compared to local machine certificate store for security purposes.

MSAL 4.x Samples is a must: Create Auzre AD User Use-case and more!

The documentation and code that describes and implements the proper method in support of "Create User" is very helpful; however, it is very out of date. Now that we have the Microsoft Identity Platform and MSAL 4.x the code looks very different - especially if there are a .NET Core WPF Desktop app and all of the different (Service Fabric Services, Windows and Linux Daemons, Console Apps and of course browser-based apps) authentications workflows. For many use-cases, this is the only source I've been able to find that provides adequate context and content w.r.t the Graph SDK with the particular application of the Azure AD Graph, now consumed by the Graph API/SDK sets. It would also be very helpful to have samples built with Visual Studio as well.

Use ConfidentialClientApplicationBuilder.CreateWithOptions()

The sample instanciates the IConfidentialClientApplication by reading the options and then setting them with .With methods.

The code could be even simpler by using `ConfidentialClientApplicationBuilder.CreateWithOptions()
An example is available from https://github.com/Azure-Samples/active-directory-dotnet-iwa-v2/blob/1440daf07be2c1f46a2d2c5719478c7d555e69d0/iwa-console/Program.cs#L57-L60 or https://github.com/Azure-Samples/active-directory-dotnetcore-daemon-v2/blob/b0bfe0d8281945435d4b499d0a47ac5a6d8203a7/daemon-console/Program.cs#L62-L78

Access Planner Plans from Multiple Organisation

I have a SAAS based application which is configurable to import planner plans. while i can successfully import plans using Graph API based on logged in user. i was wondering if i can use delegate approach to sync planner plans with my cosmos database without user interactions. to achieve this. it currently relies on azure app (Client Id, Tenant Id and service account information) where organisations have to create an app with API permission which they store as primary information with my app. which i use to get the planner data. is there a better approach where i can avoid asking other organisations to create azure app (via azure app registrations).

Not working out of box

Hi,

Following the steps in the readme are resulted in an error response from the server
(System.AggregateException):

"One or more errors occurred. (Code: Authorization_IdentityNotFound\nMessage: The identity of the calling application could not be established.\n\nInner error\n)"

I've used Visual Studio for Mac 2017 7.6.9 (build 22) with all packages updated.
.net core: 2.1.2
SDK Version: 2.1.302

I believe that during setting the app, might be more fields need to set up.
If that's true It will be good to include that in the Read Me.

An unhandled exception of type 'Microsoft.Graph.ServiceException' occurred in System.Private.CoreLib.dll

'Code: Request_BadRequest
Message: One or more properties contains invalid values.

Exception gets thrown here:

userHelper.CreateUser("SDK Test User", alias, domain, "ChangeThis!0").GetAwaiter().GetResult();

All values are strings and the domain is valid. Should the password be encrypted perhaps, or maybe it doesn't meet policy requirments?

Incidentally, the step to add "domain" and its value to appsettings.json seems to be missing from the instructions.

All Planner plans

what kind of authentication i should be passing to access all planner plans and their tasks. aparently i can not access plans where i am not part of.... which is causing an issue with my application.

any thoughts on authentication strategy where i can access all plans through graph api.

domain is null

Continuing on yesterdays project, and just adding the new userhelper and adding to program.cs, the string domain = config["domain"]; returns null in my environment, so it fails. I have to set a domain constant to get it to work.

Day 21 Planner device auth works with admin user, fails with end user

The code for day 21 works fine when I do device code auth as an admin user, but fails when I try to do it with a normal end user. In the console app I get: Unhandled Exception: Microsoft.Identity.Client.MsalUiRequiredException: AADSTS50097: Device authentication is required.

It is not clear to me if this is supposed to be able to run as a delegated permission using just normal work accounts in my organization?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.