Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

[Az.Resources] Adding examples of how to use ServicePrincipalName parameter #26891

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

SebastianClaesson
Copy link
Contributor

Description

Adding examples of how to use the 'ServicePrincipalName' parameter.

Mandatory Checklist

  • SHOULD update ChangeLog.md file(s) appropriately
    • For SDK-based development mode, update src/{{SERVICE}}/{{SERVICE}}/ChangeLog.md.
      • A snippet outlining the change(s) made in the PR should be written under the ## Upcoming Release header in the past tense.
    • For autorest-based development mode, include the changelog in the PR description.
    • Should not change ChangeLog.md if no new release is required, such as fixing test case only.
  • SHOULD regenerate markdown help files if there is cmdlet API change. Instruction
  • SHOULD have proper test coverage for changes in pull request.
  • SHOULD NOT adjust version of module manually in pull request

Adding examples of how to use the 'ServicePrincipalName' parameter.
Copy link

azure-client-tools-bot-prd bot commented Dec 17, 2024

️✔️Az.Resources
️✔️Build
️✔️PowerShell Core - Windows
️✔️Windows PowerShell - Windows
️✔️Help Example Check
️✔️PowerShell Core - Windows
️✔️Windows PowerShell - Windows
️✔️Help File Existence Check
️✔️PowerShell Core - Windows
️✔️Windows PowerShell - Windows

Copy link
Contributor

Thank you for your contribution SebastianClaesson! We will review the pull request and get back to you soon.

@SebastianClaesson SebastianClaesson changed the title Update Get-AzRoleAssignment.md Adding examples of how to use ServicePrincipalName parameter Dec 17, 2024
@VeryEarly VeryEarly self-assigned this Dec 18, 2024
@YanaXu
Copy link
Contributor

YanaXu commented Jan 7, 2025

/azp run

Copy link
Contributor

Azure Pipelines successfully started running 3 pipeline(s).

@YanaXu YanaXu assigned YanaXu and unassigned VeryEarly Jan 7, 2025
@YanaXu
Copy link
Contributor

YanaXu commented Jan 7, 2025

Hi @SebastianClaesson,

Please join your github account to Azure org.

@YanaXu YanaXu assigned notyashhh and unassigned YanaXu Jan 7, 2025
Removed example 6 as it was very similiar to example 5.
@YanaXu YanaXu changed the title Adding examples of how to use ServicePrincipalName parameter [Az.Resources] Adding examples of how to use ServicePrincipalName parameter Jan 8, 2025
@notyashhh
Copy link
Member

/azp run azure-powershell - security-tools

Copy link
Contributor

Azure Pipelines successfully started running 1 pipeline(s).

@notyashhh
Copy link
Member

notyashhh commented Jan 21, 2025

@SebastianClaesson The changes look good, a few things from my side,

  1. Can you please provide some proof of the Example test case working live? (perhaps a screenshot?)

Copy link

This PR was labeled "needs-revision" because it has unresolved review comments or CI failures.
Please resolve all open review comments and make sure all CI checks are green. Refer to our guide to troubleshoot common CI failures.

@SebastianClaesson
Copy link
Contributor Author

SebastianClaesson commented Jan 31, 2025

@SebastianClaesson The changes look good, a few things from my side,

  1. Can you please provide some proof of the Example test case working live? (perhaps a screenshot?)

Aboslutely!

Here is a screenshot;
image

Here's the code;

$ApplicationObject = Get-AzADServicePrincipal -DisplayName 'sc-azdo-vendingmachine'
$ApplicationObject | Select DisplayName, AppId, '#oDataType'
Get-AzRoleAssignment -ServicePrincipalName $ApplicationObject.AppId | Select DisplayName, RoleDefinitionName, ObjectType, Scope

# for free to join this conversation on GitHub. Already have an account? # to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants