Skip to content

Toolkit using M365 account to provision Azure resources #14814

@NWH-SAmin5

Description

@NWH-SAmin5

Describe the bug
M365 Agent Toolkit is using M365 account to provision Azure Resources with actions like aadApp/create, aadApp/update

Environment scenario
Single tenant
As a developer I use two accounts in same tenant.
Microsoft 365 Account: [email protected]
Azure Account: [email protected]

[email protected] does not have access to Create/Update Azure resources like aad app.

To Reproduce
Steps to reproduce the behavior:

  1. Sign in M365 account with [email protected]
  2. Sign in Azure account with [email protected]
  3. Execute Local or Dev environment provisioning
  4. ... going through action aadApp/create OR aadApp/update
  5. Error: Message for denied access

Issue
I reviewed Fiddler trace to review the REST API call to update the aap app.
Auth token sent to Microsoft Graph REST API to update the Azure Application, is from M365 account instead of Azure account.
Added few screenshots

Expected behavior
Use [email protected] to provision resources in Azure and use [email protected] for M365 resources

VS Code Extension Information (please complete the following information):

  • OS: Windows Server 2022 Data Center
  • Version 6.4.0

Additional context
Fiddler screenshot of decoded Auth token to confirm the account being used (Sorry had to remove)

Image Image Image Image

Metadata

Metadata

Labels

needs attentionThis issue needs the attention of a contributor.

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions