Azure-Samples / Azure-Samples/active-directory-dotnetcore-daemon-v2

6-Call-OwnApi-ManagedIdentity cannot work outside of Azure-hosted infra, and has confusing instructions

Open
#206 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
PowerShell
Stars
263
Forks
162
PR merge metrics
No merged PRs in 30d

Description

Hello there!

I just spent a couple of days working through this before realising that it was never going to work. Some issues, in no order:

- The readme says you need a VM or App Service running in Azure but doesn't tell you how to run the API server or the daemon in those environments
- **If you don't run the client in an Azure environment it cannot be given a managed identity.**
- If you run the client in an Azure environment, it's unlikely you'll be able to use `localhost` to reach the API server, so documentation on how to set that correctly would be helpful
- 'Expose an API' doesn't have a 'Set' button in the Azure Portal
- If you add the 'app role' verbatim in the manifest there's an error because `lang` is `null`. Removing it entirely works fine
- The instructions for granting the managed ID permissions on the app role could have inlined the relevant PowerShell from the linked documentation (and the changes required) - and made explicit that this operation is _not possible_ in the portal (unless I'm mistaken?)
- The docs don't say that you need to update the `Scopes` key in the console app config with the API server GUID
- As mentioned in #202 there are [spaces in some of the config keys](https://github.com/Azure-Samples/active-directory-dotnetcore-daemon-v2/blob/842a27175ec3d1d37fe193ae389257e17f0f6efc/6-Call-OwnApi-ManagedIdentity/daemon-console/appsettings.json#L8-L9), which breaks the parsing

Contributor guide

Open the contributing guide

Research direction

Start with the README for 6-Call-OwnApi-ManagedIdentity and daemon-console/appsettings.json, including the linked configuration lines. Document how to run the API and daemon in Azure, configure the API endpoint and Scopes GUID, create the app role, and grant managed-identity permissions with the required PowerShell. Correct the config keys and verify the instructions against the sample flow.

Written by the indexing model from the issue text.

Assessment

Tech stack
azure, powershell
Domain
authentication, cloud, documentation
Issue type
Documentation
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.