Open martinlingstuyl opened 1 year ago
We should also mention that if you use the login with a custom appId
you need to specify the tenant
if your app is not multi tenant. Feels like we can pick that up in this same issue.
Updated it
That's not a good example, as it would not log you in successfully. You need the --appId value as well. And if your app registration is configured as single tenant, you will need the --tenant option as well. Otherwise you get an error.
I think it would work if the values are set in an environment variable, but I do agree that it's not clear, so we should either expand the sample's code or mention it specifically in the sample's description that precedes the code.
I see what you mean. I'm in favor of expanding the samples. Using env variables, while a possibility is not the primary mode to work, I think.
We could add an extra note about the possibility to use env variables...
Using env variables, while a possibility is not the primary mode to work, I think.
I think it all depends on the use case. I think you're unlikely to login interactively with a secret or cert, because these options are typically used in the context of automation with app-only access, where you might define app- and tenant ID in env vars. There's no harm in adding an extra explanation to the existing sample saying that it assumes specific values are set in env vars, and then adding another version where app- and tenant ID are specified through args.
Description
Check out this example:
That's not a good example, as it would not log you in successfully. You need the
--appId
value as well. And if your app registration is configured as single tenant, you will need the--tenant
option as well. Otherwise you get an error. An example should be able to be run as it is (with the right values), so we should add the options here.All the examples for logging in with a certificate, have the same deficiency and should be fixed as well.