{Graph} Fix linter and style errors#22318
Conversation
| text: | | ||
| az ad app create --display-name my-native --native-app --required-resource-accesses @manifest.json | ||
| az ad app create --display-name mytestapp | ||
| - name: Create an application that can fall back to public client with Microsoft Graph delegated permission Application.Read.All |
There was a problem hiding this comment.
Updated example from using outdated AD Graph permission to MS Graph permission.
| } | ||
|
|
||
|
|
||
| def set_object_properties(object_type, graph_object, **kwargs): |
There was a problem hiding this comment.
Expose public method set_object_properties.
|
Graph |
| examples: | ||
| - name: Grant a native application with permissions to access an existing API with TTL of 2 years | ||
| text: az ad app permission grant --id e042ec79-34cd-498f-9d9f-1234234 --api a0322f79-57df-498f-9d9f-12678 | ||
| text: az ad app permission grant --id e042ec79-34cd-498f-9d9f-1234234 --api a0322f79-57df-498f-9d9f-12678 --scope Directory.Read.All |
There was a problem hiding this comment.
--scope's default value user_impersonation is removed, as user_impersonation is very highly privileged.
| examples: | ||
| - name: Append a certificate to the service principal with the certificate string. | ||
| text: az ad sp credential reset --name myapp --cert "MIICoT..." --append | ||
| text: az ad sp credential reset --id myapp --cert "MIICoT..." --append |
There was a problem hiding this comment.
az ad sp credential list and az ad sp credential delete both use --id. Only az ad sp credential reset uses --name, so we unify them.
| short-summary: Create an Azure Active Directory user. | ||
| parameters: | ||
| - name: --force-change-password-next-login | ||
| - name: --force-change-password-next-sign-in |
There was a problem hiding this comment.
This breaking change is undocumented in Graph doc (https://github.com/microsoftgraph/microsoft-graph-docs/issues/16819).
| raise CLIError("'{}' doesn't exist in graph object '{}'.".format( | ||
| key_id, graph_object[ID])) | ||
| else: | ||
| raise CLIError("No key credential found with keyId as '{}' in graph object '{}'.".format( |
There was a problem hiding this comment.
Use the same error message as application: removeKey.
| 'new_mail_nick_name': 'graphusertestupdate', | ||
| 'group': 'graphusertest_g', | ||
| 'password': 'Test1234!!', | ||
| 'password': self.create_random_name(prefix='password-', length=40), |
There was a problem hiding this comment.
Use random password and replace it in recordings to make it more secure.
Related command
Fix
Corresponding doc update: MicrosoftDocs/azure-docs-cli#3122