Get-AzAccessToken
Onbewerkt toegangstoken ophalen. Wanneer u -ResourceUrl gebruikt, moet u ervoor zorgen dat de waarde overeenkomt met de huidige Azure-omgeving. U kunt verwijzen naar de waarde van (Get-AzContext).Environment.
Notitie
Dit is de vorige versie van onze documentatie. Raadpleeg de meest recente versie voor actuele informatie.
Syntax
Get-AzAccessToken
[-ResourceTypeName <String>]
[-TenantId <String>]
[-DefaultProfile <IAzureContextContainer>]
[<CommonParameters>]
Get-AzAccessToken
-ResourceUrl <String>
[-TenantId <String>]
[-DefaultProfile <IAzureContextContainer>]
[<CommonParameters>]
Description
Toegangstoken ophalen
Voorbeelden
Voorbeeld 1 Het toegangstoken voor ARM-eindpunt ophalen
Get-AzAccessToken
Toegangstoken van huidig account ophalen voor ResourceManager-eindpunt
Voorbeeld 2 Het toegangstoken voor Microsoft Graph-eindpunt ophalen
Get-AzAccessToken -ResourceTypeName MSGraph
Toegangstoken van Microsoft Graph-eindpunt ophalen voor huidig account
Voorbeeld 3 Het toegangstoken voor Microsoft Graph-eindpunt ophalen
Get-AzAccessToken -ResourceUrl "https://graph.microsoft.com/"
Toegangstoken van Microsoft Graph-eindpunt ophalen voor huidig account
Parameters
De referenties, het account, de tenant en het abonnement dat wordt gebruikt voor communicatie met Azure.
| Type: | IAzureContextContainer |
| Aliases: | AzContext, AzureRmContext, AzureCredential |
| Position: | Named |
| Default value: | None |
| Accept pipeline input: | False |
| Accept wildcard characters: | False |
Optionele resourcetypenaam, ondersteunde waarden: AadGraph, AnalysisServices, Arm, Attestation, Batch, DataLake, KeyVault, MSGraph, OperationalInsights, ResourceManager, Storage, Synapse. De standaardwaarde is Arm als deze niet is opgegeven.
| Type: | String |
| Position: | Named |
| Default value: | None |
| Accept pipeline input: | False |
| Accept wildcard characters: | False |
Resource-URL voor het token dat u aanvraagt, bijvoorbeeld 'https://graph.microsoft.com/'.
| Type: | String |
| Aliases: | Resource, ResourceUri |
| Position: | Named |
| Default value: | None |
| Accept pipeline input: | False |
| Accept wildcard characters: | False |
Optionele tenant-id. Gebruik de tenant-id van de standaardcontext als deze niet is opgegeven.
| Type: | String |
| Position: | Named |
| Default value: | None |
| Accept pipeline input: | False |
| Accept wildcard characters: | False |
Invoerwaarden
None