Giter Club home page Giter Club logo

samplecpmproject's Introduction

Sample CPM Project

This sample project provides code snipets on how to call the REST api of the CPM service programmatically.

Prerequisites

Client Id and Client Secrets

Please refer to http://aka.ms/cpmapi for instructions on how to retrieve the necessary settings. This project assumes that you already have at least one topic id registered within the CPM system.

Visual Studio Version

You must use VS2015 or VS2017. We do not support any previous versions of Visual Studio.

NuGet packages

This sample project utilises a package called Microsoft.Cpm.Api.Contracts that is supplied and maintained by our team.

Visual Studio instructions

Please configure your NuGet package manager with the following feed details:

Install the latest version available.

NuGet command line instructions

If you prefer to install the packages manually, use the following command:

Install-Package Microsoft.Cpm.Api.Contracts -Source "https://microsoft.pkgs.visualstudio.com/_packaging/MCKP.CPM/nuget/v3/index.json" -Version 3.0.19

Please note that you will have to locate what the latest version is.

https://microsoft.visualstudio.com/Universal%20Store/_packaging?_a=package&feed=MCKP.CPM&package=Microsoft.Cpm.Api.Contracts&version=3.0.19&protocolType=NuGet

Getting access

If you keep getting a login screen when trying to add our NuGet feed to Visual Studio, it is most likely because your team does not have access to our internal NuGet feed. Please submit an access request through https://aka.ms/wdgaccess.

Local installation

While access is being granted, you can temporarily unblock your development pipeline by retrieving an older version from the Contact Permissions Master Sharepoint and creating a local feed.

  • Unzip the .zip package; you should see 1 .nupkg file.
  • Place the .nupkg file in a folder of your choice.
  • Add a new NuGet feed in VS, with the full path of the folder as the source.
  • In the project, open the packages.config file and remove the Microsoft.Cpm.Api.Contracts reference.
  • Open the feed and install the packages from there.

Please note that the packages in the Sharepoint folder are NOT maintained! Do follow up on your access request ASAP to enjoy the latest NuGet packages.

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.

samplecpmproject's People

Contributors

bobopd avatar microsoft-github-policy-service[bot] avatar microsoftopensource avatar msftgits avatar v-satyar avatar wendilimms avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

samplecpmproject's Issues

CPMClientGenerator never renews Aad Token

If you are using this code on a long-running service such as a web application, the AadToken will never be regenerated. Since June, these tokens will become unauthorized after about an hour of use.

Due to CpmClientGenerator being a static class, the call to Active Directory to retrieve a new token is never made again.

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.