Skip to content

Instantly share code, notes, and snippets.

@manoj-choudhari-git
Created May 23, 2020 09:08
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save manoj-choudhari-git/23b8d6becf994aca55e129734b934e96 to your computer and use it in GitHub Desktop.
Save manoj-choudhari-git/23b8d6becf994aca55e129734b934e96 to your computer and use it in GitHub Desktop.
Snippet from startup.cs of web application asking scope for only caller api
services.AddSignIn(Configuration, "AzureAd");
services.AddWebAppCallsProtectedWebApi(Configuration,
initialScopes: new string[] {
"user.read",
// Scope of caller API
"api://262f3e7b-20cb-42cb-8a23-2d6c8003ee3a/caller-api"
})
.AddInMemoryTokenCaches();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment