Azure / Azure/azure-powershell
Set-AzSqlServerActiveDirectoryAdministrator returns Forbidden
- Dominant language
- C#
- Stars
- 4.8k
- Forks
- 4.3k
- Avg merge
- 3d 14h
- Merged PRs (30d)
- 54
Description
## Description
We are using an Azure AD App Registration to do the deployments using Azure DevOps. When trying to run the `Set-AzSqlServerActiveDirectoryAdministrator` using this app registration, I get the following for a specified ObjectId and DisplayName -
```
2020-06-16T17:31:44.3086211Z ##[error]Operation returned an invalid status code 'Forbidden'
```
But, when I try to use a user account using Active Directory authentication in the Devops pipeline, it works without any issues for the same object id and Display name.
Please do note that this App Registration has the following scopes with the administrator consent granted to it at the directory level -
```
API Permission – Microsoft Graph
Scope – User.Read.All
Permission Type – Application Permissions
```
From the looks of it, it seems like the permission is required for the older GRAPH endpoint instead of the newer graph endpoint. Can this be moved to the latest version of Graph?
## Steps to reproduce
```powershell
$Credential = Get-Credential
Connect-AzAccount -Credential $Credential -Tenant 'xxxx-xxxx-xxxx-xxxx' -ServicePrincipal
Set-AzSqlServerActiveDirectoryAdministrator -ResourceGroupName "Test" -ServerName "TestSqlServer" -ObjectId 'xxxx-xxxx-xxxx-xxx' -DisplayName 'PipelineAgent'
```
## Environment data
It runs in Windows 2019 Image in Azure Devops Pipelines
## Module versions
```powershell
```
## Debug output
```
2020-06-17T12:41:08.9264518Z DEBUG: 12:41:08 PM - SetAzureSqlServerActiveDirectoryAdministrator begin processing with ParameterSet
2020-06-17T12:41:08.9284194Z '__AllParameterSets'.
2020-06-17T12:41:08.9305555Z DEBUG: 12:41:08 PM - using account id '***'...
2020-06-17T12:41:10.3803453Z DEBUG: [Common.Authentication]: Authenticating using Account: '***', environment:
2020-06-17T12:41:10.3824243Z 'AzureCloud', tenant: '***'
2020-06-17T12:41:10.3850527Z DEBUG: [Common.Authentication]: Authenticating using configuration values: Domain:
2020-06-17T12:41:10.3870904Z '***', Endpoint: 'https://login.microsoftonline.com/', ClientId:
2020-06-17T12:41:10.3889808Z '1950a258-227b-4e31-a9cf-717495945fc2', ClientRedirect: 'urn:ietf:wg:oauth:2.0:oob', ResourceClientUri:
2020-06-17T12:41:10.3905566Z 'https://management.core.windows.net/', ValidateAuthority: 'True'
2020-06-17T12:41:10.3924141Z DEBUG: [Common.Authentication]: Renewing token using AppId: '***', AdalConfiguration
2020-06-17T12:41:10.3940800Z with ADDomain: '***', AdEndpoint: 'https://login.microsoftonline.com/', ClientId:
2020-06-17T12:41:10.3958228Z '1950a258-227b-4e31-a9cf-717495945fc2', RedirectUri: 'urn:ietf:wg:oauth:2.0:oob'
2020-06-17T12:41:10.3975503Z DEBUG: [ADAL]: Information: 2020-06-17T12:41:09.2333727Z: e408aa35-7f48-4452-aa41-a28bd31f8d3f - LoggerBase.cs: ADAL
2020-06-17T12:41:10.3995909Z PCL.Desktop with assembly version '3.19.2.6005', file version '3.19.50302.0130' and informational version
2020-06-17T12:41:10.4013804Z '2a8bec6c4c76d0c1ef819b55bdc3cda2d2605056' is running...
2020-06-17T12:41:10.4030898Z DEBUG: [ADAL]: Information: 2020-06-17T12:41:09.2333727Z: e408aa35-7f48-4452-aa41-a28bd31f8d3f - LoggerBase.cs: ADAL
2020-06-17T12:41:10.4046690Z PCL.Desktop with assembly version '3.19.2.6005', file version '3.19.50302.0130' and informational version
2020-06-17T12:41:10.4061900Z '2a8bec6c4c76d0c1ef819b55bdc3cda2d2605056' is running...
2020-06-17T12:41:10.4077853Z DEBUG: [ADAL]: Information: 2020-06-17T12:41:09.2333727Z: e408aa35-7f48-4452-aa41-a28bd31f8d3f - LoggerBase.cs: ===
2020-06-17T12:41:10.4089718Z Token Acquisition started:
2020-06-17T12:41:10.4105583Z CacheType: null
2020-06-17T12:41:10.4123360Z Authentication Target: Client
2020-06-17T12:41:10.4140576Z , Authority Host: login.microsoftonline.com
2020-06-17T12:41:10.4161162Z DEBUG: [ADAL]: Information: 2020-06-17T12:41:09.2333727Z: e408aa35-7f48-4452-aa41-a28bd31f8d3f - LoggerBase.cs: ===
2020-06-17T12:41:10.4175059Z Token Acquisition started:
2020-06-17T12:41:10.4192397Z Authority: https://login.microsoftonline.com/***/
2020-06-17T12:41:10.4203268Z Resource: https://management.core.windows.net/
2020-06-17T12:41:10.4218003Z ClientId: ***
2020-06-17T12:41:10.4231447Z CacheType: null
2020-06-17T12:41:10.4246741Z Authentication Target: Client
2020-06-17T12:41:10.4264381Z
2020-06-17T12:41:10.4282004Z DEBUG: [ADAL]: Verbose: 2020-06-17T12:41:09.2333727Z: e408aa35-7f48-4452-aa41-a28bd31f8d3f - LoggerBase.cs: Loading
2020-06-17T12:41:10.4307816Z from cache.
2020-06-17T12:41:10.4325274Z DEBUG: [ADAL]: Verbose: 2020-06-17T12:41:09.2333727Z: e408aa35-7f48-4452-aa41-a28bd31f8d3f - LoggerBase.cs: Loading
2020-06-17T12:41:10.4335781Z from cache.
2020-06-17T12:41:10.4352692Z DEBUG: [ADAL]: Information: 2020-06-17T12:41:09.2333727Z: 00000000-0000-0000-0000-000000000000 - LoggerBase.cs:
2020-06-17T12:41:10.4362430Z Deserialized 1 items to token cache.
2020-06-17T12:41:10.4375721Z DEBUG: [ADAL]: Verbose: 2020-06-17T12:41:09.2333727Z: e408aa35-7f48-4452-aa41-a28bd31f8d3f - LoggerBase.cs: Looking up
2020-06-17T12:41:10.4390733Z cache for a token...
2020-06-17T12:41:10.4404850Z DEBUG: [ADAL]: Verbose: 2020-06-17T12:41:09.2333727Z: e408aa35-7f48-4452-aa41-a28bd31f8d3f - LoggerBase.cs: Looking up
2020-06-17T12:41:10.4421453Z cache for a token...
2020-06-17T12:41:10.4436562Z DEBUG: [ADAL]: Information: 2020-06-17T12:41:09.2333727Z: e408aa35-7f48-4452-aa41-a28bd31f8d3f - LoggerBase.cs: An item
2020-06-17T12:41:10.4450635Z matching the requested resource was found in the cache
2020-06-17T12:41:10.4466320Z DEBUG: [ADAL]: Information: 2020-06-17T12:41:09.2333727Z: e408aa35-7f48-4452-aa41-a28bd31f8d3f - LoggerBase.cs: An item
2020-06-17T12:41:10.4481599Z matching the requested resource was found in the cache
2020-06-17T12:41:10.4498895Z DEBUG: [ADAL]: Information: 2020-06-17T12:41:09.2333727Z: e408aa35-7f48-4452-aa41-a28bd31f8d3f - LoggerBase.cs:
2020-06-17T12:41:10.4515447Z 59.9133771216667 minutes left until token in cache expires
2020-06-17T12:41:10.4532252Z DEBUG: [ADAL]: Information: 2020-06-17T12:41:09.2343746Z: e408aa35-7f48-4452-aa41-a28bd31f8d3f - LoggerBase.cs:
2020-06-17T12:41:10.4546063Z 59.9133771216667 minutes left until token in cache expires
2020-06-17T12:41:10.4562311Z DEBUG: [ADAL]: Information: 2020-06-17T12:41:09.2343746Z: e408aa35-7f48-4452-aa41-a28bd31f8d3f - LoggerBase.cs: A
2020-06-17T12:41:10.4578888Z matching item (access token or refresh token or both) was found in the cache
2020-06-17T12:41:10.4595354Z DEBUG: [ADAL]: Information: 2020-06-17T12:41:09.2343746Z: e408aa35-7f48-4452-aa41-a28bd31f8d3f - LoggerBase.cs: A
2020-06-17T12:41:10.4612094Z matching item (access token or refresh token or both) was found in the cache
2020-06-17T12:41:10.4628232Z DEBUG: [ADAL]: Information: 2020-06-17T12:41:09.2343746Z: e408aa35-7f48-4452-aa41-a28bd31f8d3f - LoggerBase.cs: ===
2020-06-17T12:41:10.4643985Z Token Acquisition finished successfully. An access token was returned: Expiration Time: 6/17/2020 1:41:04 PM +00:00
2020-06-17T12:41:10.4660608Z DEBUG: [ADAL]: Information: 2020-06-17T12:41:09.2343746Z: e408aa35-7f48-4452-aa41-a28bd31f8d3f - LoggerBase.cs: ===
2020-06-17T12:41:10.4676650Z Token Acquisition finished successfully. An access token was returned: Expiration Time: 6/17/2020 1:41:04 PM
2020-06-17T12:41:10.4691722Z +00:00Access Token Hash: I2mOjCEG9Y4CM6zhH0MW4nCM8Y=
2020-06-17T12:41:10.4707102Z User id:
2020-06-17T12:41:10.4723919Z DEBUG: [Common.Authentication]: Checking token expiration, token expires '06/17/2020 13:41:04 +00:00' Comparing to
2020-06-17T12:41:10.4745962Z '06/17/2020 12:41:09 +00:00' With threshold '00:05:00', calculated time until token expiry: '00:59:54.3071967'
2020-06-17T12:41:10.4763544Z DEBUG: ============================ HTTP REQUEST ============================
2020-06-17T12:41:10.4770038Z
2020-06-17T12:41:10.4775491Z
2020-06-17T12:41:10.4780909Z
2020-06-17T12:41:10.4797092Z HTTP Method:
2020-06-17T12:41:10.4802148Z
2020-06-17T12:41:10.4817537Z GET
2020-06-17T12:41:10.4823479Z
2020-06-17T12:41:10.4828764Z
2020-06-17T12:41:10.4833896Z
2020-06-17T12:41:10.4848493Z Absolute Uri:
2020-06-17T12:41:10.4855243Z
2020-06-17T12:41:10.4873212Z https://management.azure.com/subscriptions/xxxx-xxxx-xxxx/resourceGroups/CP0/provider
2020-06-17T12:41:10.4890187Z s/Microsoft.Sql/servers/sql-01/administrators/ActiveDirectory?api-version=2019-06-01-preview
2020-06-17T12:41:10.4896064Z
2020-06-17T12:41:10.4903156Z
2020-06-17T12:41:10.4909814Z
2020-06-17T12:41:10.4926359Z Headers:
2020-06-17T12:41:10.4932655Z
2020-06-17T12:41:10.4952757Z x-ms-client-request-id : 4d63d455-f454-42d9-98f4-85f0f8d030cb
2020-06-17T12:41:10.4957624Z
2020-06-17T12:41:10.4972774Z accept-language : en-US
2020-06-17T12:41:10.4978682Z
2020-06-17T12:41:10.4984505Z
2020-06-17T12:41:10.4989101Z
2020-06-17T12:41:10.5006381Z Body:
2020-06-17T12:41:10.5012188Z
2020-06-17T12:41:10.5018185Z
2020-06-17T12:41:10.5023999Z
2020-06-17T12:41:10.5029599Z
2020-06-17T12:41:10.5045631Z DEBUG: ============================ HTTP RESPONSE ============================
2020-06-17T12:41:10.5050642Z
2020-06-17T12:41:10.5056045Z
2020-06-17T12:41:10.5061825Z
2020-06-17T12:41:10.5091608Z Status Code:
2020-06-17T12:41:10.5098043Z
2020-06-17T12:41:10.5114789Z NotFound
2020-06-17T12:41:10.5131465Z
2020-06-17T12:41:10.5136646Z
2020-06-17T12:41:10.5142076Z
2020-06-17T12:41:10.5158363Z Headers:
2020-06-17T12:41:10.5163966Z
2020-06-17T12:41:10.5180988Z Pragma : no-cache
2020-06-17T12:41:10.5186935Z
2020-06-17T12:41:10.5201375Z x-ms-request-id : 345af20e-6888-47ea-9748-bf040cf8a988
2020-06-17T12:41:10.5206743Z
2020-06-17T12:41:10.5222304Z x-ms-ratelimit-remaining-subscription-reads: 11999
2020-06-17T12:41:10.5227753Z
2020-06-17T12:41:10.5243005Z x-ms-correlation-request-id : 1e29dc0b-91e4-46dc-bf19-e95b03ee7a08
2020-06-17T12:41:10.5250299Z
2020-06-17T12:41:10.5268557Z x-ms-routing-request-id : EASTUS:20200617T124109Z:1e29dc0b-91e4-46dc-bf19-e95b03ee7a08
2020-06-17T12:41:10.5271554Z
2020-06-17T12:41:10.5288300Z Strict-Transport-Security : max-age=31536000; includeSubDomains
2020-06-17T12:41:10.5294006Z
2020-06-17T12:41:10.5309451Z X-Content-Type-Options : nosniff
2020-06-17T12:41:10.5315015Z
2020-06-17T12:41:10.5329810Z Cache-Control : no-cache
2020-06-17T12:41:10.5335119Z
2020-06-17T12:41:10.5352922Z Date : Wed, 17 Jun 2020 12:41:09 GMT
2020-06-17T12:41:10.5358899Z
2020-06-17T12:41:10.5378470Z Server : Microsoft-HTTPAPI/2.0
2020-06-17T12:41:10.5383534Z
2020-06-17T12:41:10.5388471Z
2020-06-17T12:41:10.5393991Z
2020-06-17T12:41:10.5411010Z Body:
2020-06-17T12:41:10.5416877Z
2020-06-17T12:41:10.5434520Z {
2020-06-17T12:41:10.5439336Z
2020-06-17T12:41:10.5455798Z "error": {
2020-06-17T12:41:10.5461238Z
2020-06-17T12:41:10.5477764Z "code": "ResourceNotFound",
2020-06-17T12:41:10.5483650Z
2020-06-17T12:41:10.5499660Z "message": "The requested resource of type 'Microsoft.Sql/servers/administrators' with name 'ActiveDirectory' was
2020-06-17T12:41:10.5515411Z not found."
2020-06-17T12:41:10.5520918Z
2020-06-17T12:41:10.5539085Z }
2020-06-17T12:41:10.5547259Z
2020-06-17T12:41:10.5566551Z }
2020-06-17T12:41:10.5572248Z
2020-06-17T12:41:10.5578339Z
2020-06-17T12:41:10.5595617Z DEBUG: [Common.Authentication]: Authenticating using Account: '***', environment:
2020-06-17T12:41:10.5611331Z 'AzureCloud', tenant: '***'
2020-06-17T12:41:10.5626995Z DEBUG: [Common.Authentication]: Authenticating using configuration values: Domain:
2020-06-17T12:41:10.5644054Z '***', Endpoint: 'https://login.microsoftonline.com/', ClientId:
2020-06-17T12:41:10.5660333Z '1950a258-227b-4e31-a9cf-717495945fc2', ClientRedirect: 'urn:ietf:wg:oauth:2.0:oob', ResourceClientUri:
2020-06-17T12:41:10.5675771Z 'https://graph.windows.net/', ValidateAuthority: 'True'
2020-06-17T12:41:10.5699146Z DEBUG: [Common.Authentication]: Renewing token using AppId: '***', AdalConfiguration
2020-06-17T12:41:10.5715551Z with ADDomain: '***', AdEndpoint: 'https://login.microsoftonline.com/', ClientId:
2020-06-17T12:41:10.5739293Z '1950a258-227b-4e31-a9cf-717495945fc2', RedirectUri: 'urn:ietf:wg:oauth:2.0:oob'
2020-06-17T12:41:10.5755668Z DEBUG: [ADAL]: Information: 2020-06-17T12:41:09.8765618Z: 656fdbdc-abb8-48b9-9b05-3fde470716df - LoggerBase.cs: ADAL
2020-06-17T12:41:10.5771627Z PCL.Desktop with assembly version '3.19.2.6005', file version '3.19.50302.0130' and informational version
2020-06-17T12:41:10.5783297Z '2a8bec6c4c76d0c1ef819b55bdc3cda2d2605056' is running...
2020-06-17T12:41:10.5800905Z DEBUG: [ADAL]: Information: 2020-06-17T12:41:09.8765618Z: 656fdbdc-abb8-48b9-9b05-3fde470716df - LoggerBase.cs: ADAL
2020-06-17T12:41:10.5818787Z PCL.Desktop with assembly version '3.19.2.6005', file version '3.19.50302.0130' and informational version
2020-06-17T12:41:10.5834328Z '2a8bec6c4c76d0c1ef819b55bdc3cda2d2605056' is running...
2020-06-17T12:41:10.5853942Z DEBUG: [ADAL]: Information: 2020-06-17T12:41:09.8775712Z: 656fdbdc-abb8-48b9-9b05-3fde470716df - LoggerBase.cs: ===
2020-06-17T12:41:10.5871865Z Token Acquisition started:
2020-06-17T12:41:10.5890080Z CacheType: null
2020-06-17T12:41:10.5906350Z Authentication Target: Client
2020-06-17T12:41:10.5923838Z , Authority Host: login.microsoftonline.com
2020-06-17T12:41:10.5941950Z DEBUG: [ADAL]: Information: 2020-06-17T12:41:09.8775712Z: 656fdbdc-abb8-48b9-9b05-3fde470716df - LoggerBase.cs: ===
2020-06-17T12:41:10.5959136Z Token Acquisition started:
2020-06-17T12:41:10.5974647Z Authority: https://login.microsoftonline.com/***/
2020-06-17T12:41:10.5991416Z Resource: https://graph.windows.net/
2020-06-17T12:41:10.6010315Z ClientId: ***
2020-06-17T12:41:10.6028234Z CacheType: null
2020-06-17T12:41:10.6044594Z Authentication Target: Client
2020-06-17T12:41:10.6061257Z
2020-06-17T12:41:10.6080319Z DEBUG: [ADAL]: Verbose: 2020-06-17T12:41:09.8775712Z: 656fdbdc-abb8-48b9-9b05-3fde470716df - LoggerBase.cs: Loading
2020-06-17T12:41:10.6098450Z from cache.
2020-06-17T12:41:10.6114690Z DEBUG: [ADAL]: Verbose: 2020-06-17T12:41:09.8775712Z: 656fdbdc-abb8-48b9-9b05-3fde470716df - LoggerBase.cs: Loading
2020-06-17T12:41:10.6133749Z from cache.
2020-06-17T12:41:10.6156362Z DEBUG: [ADAL]: Information: 2020-06-17T12:41:09.8775712Z: 00000000-0000-0000-0000-000000000000 - LoggerBase.cs:
2020-06-17T12:41:10.6178419Z Deserialized 1 items to token cache.
2020-06-17T12:41:10.6202439Z DEBUG: [ADAL]: Verbose: 2020-06-17T12:41:09.8775712Z: 656fdbdc-abb8-48b9-9b05-3fde470716df - LoggerBase.cs: Looking up
2020-06-17T12:41:10.6220938Z cache for a token...
2020-06-17T12:41:10.6242680Z DEBUG: [ADAL]: Verbose: 2020-06-17T12:41:09.8775712Z: 656fdbdc-abb8-48b9-9b05-3fde470716df - LoggerBase.cs: Looking up
2020-06-17T12:41:10.6264299Z cache for a token...
2020-06-17T12:41:10.6281687Z DEBUG: [ADAL]: Information: 2020-06-17T12:41:09.8775712Z: 656fdbdc-abb8-48b9-9b05-3fde470716df - LoggerBase.cs: No
2020-06-17T12:41:10.6298570Z matching token was found in the cache
2020-06-17T12:41:10.6320480Z DEBUG: [ADAL]: Information: 2020-06-17T12:41:09.8775712Z: 656fdbdc-abb8-48b9-9b05-3fde470716df - LoggerBase.cs: No
2020-06-17T12:41:10.6336958Z matching token was found in the cache
2020-06-17T12:41:10.6354362Z DEBUG: [ADAL]: Verbose: 2020-06-17T12:41:09.8775712Z: 656fdbdc-abb8-48b9-9b05-3fde470716df - LoggerBase.cs: Looking up
2020-06-17T12:41:10.6367411Z cache for a token...
2020-06-17T12:41:10.6385502Z DEBUG: [ADAL]: Verbose: 2020-06-17T12:41:09.8775712Z: 656fdbdc-abb8-48b9-9b05-3fde470716df - LoggerBase.cs: Looking up
2020-06-17T12:41:10.6400887Z cache for a token...
2020-06-17T12:41:10.6415835Z DEBUG: [ADAL]: Information: 2020-06-17T12:41:09.8775712Z: 656fdbdc-abb8-48b9-9b05-3fde470716df - LoggerBase.cs: No
2020-06-17T12:41:10.6431686Z matching token was found in the cache
2020-06-17T12:41:10.6452124Z DEBUG: [ADAL]: Information: 2020-06-17T12:41:09.8775712Z: 656fdbdc-abb8-48b9-9b05-3fde470716df - LoggerBase.cs: No
2020-06-17T12:41:10.6472524Z matching token was found in the cache
2020-06-17T12:41:10.6489233Z DEBUG: [ADAL]: Verbose: 2020-06-17T12:41:09.8775712Z: 656fdbdc-abb8-48b9-9b05-3fde470716df - LoggerBase.cs: Looking up
2020-06-17T12:41:10.6504634Z cache for a token...
2020-06-17T12:41:10.6523820Z DEBUG: [ADAL]: Verbose: 2020-06-17T12:41:09.8775712Z: 656fdbdc-abb8-48b9-9b05-3fde470716df - LoggerBase.cs: Looking up
2020-06-17T12:41:10.6539821Z cache for a token...
2020-06-17T12:41:10.6554939Z DEBUG: [ADAL]: Information: 2020-06-17T12:41:09.8775712Z: 656fdbdc-abb8-48b9-9b05-3fde470716df - LoggerBase.cs: No
2020-06-17T12:41:10.6570079Z matching token was found in the cache
2020-06-17T12:41:10.6586289Z DEBUG: [ADAL]: Information: 2020-06-17T12:41:09.8775712Z: 656fdbdc-abb8-48b9-9b05-3fde470716df - LoggerBase.cs: No
2020-06-17T12:41:10.6601548Z matching token was found in the cache
2020-06-17T12:41:10.6619155Z DEBUG: [ADAL]: Verbose: 2020-06-17T12:41:09.8775712Z: 656fdbdc-abb8-48b9-9b05-3fde470716df - LoggerBase.cs: Looking up
2020-06-17T12:41:10.6636023Z cache for a token...
2020-06-17T12:41:10.6653077Z DEBUG: [ADAL]: Verbose: 2020-06-17T12:41:09.8775712Z: 656fdbdc-abb8-48b9-9b05-3fde470716df - LoggerBase.cs: Looking up
2020-06-17T12:41:10.6677639Z cache for a token...
2020-06-17T12:41:10.6695366Z DEBUG: [ADAL]: Information: 2020-06-17T12:41:09.8775712Z: 656fdbdc-abb8-48b9-9b05-3fde470716df - LoggerBase.cs: No
2020-06-17T12:41:10.6711942Z matching token was found in the cache
2020-06-17T12:41:10.6730058Z DEBUG: [ADAL]: Information: 2020-06-17T12:41:09.8775712Z: 656fdbdc-abb8-48b9-9b05-3fde470716df - LoggerBase.cs: No
2020-06-17T12:41:10.6746398Z matching token was found in the cache
2020-06-17T12:41:10.6762521Z DEBUG: [ADAL]: Verbose: 2020-06-17T12:41:09.8775712Z: 656fdbdc-abb8-48b9-9b05-3fde470716df - LoggerBase.cs: Looking up
2020-06-17T12:41:10.6779644Z cache for a token...
2020-06-17T12:41:10.6796696Z DEBUG: [ADAL]: Verbose: 2020-06-17T12:41:09.8775712Z: 656fdbdc-abb8-48b9-9b05-3fde470716df - LoggerBase.cs: Looking up
2020-06-17T12:41:10.6812077Z cache for a token...
2020-06-17T12:41:10.6830085Z DEBUG: [ADAL]: Information: 2020-06-17T12:41:09.8775712Z: 656fdbdc-abb8-48b9-9b05-3fde470716df - LoggerBase.cs: No
2020-06-17T12:41:10.6846841Z matching token was found in the cache
2020-06-17T12:41:10.6863390Z DEBUG: [ADAL]: Information: 2020-06-17T12:41:09.8775712Z: 656fdbdc-abb8-48b9-9b05-3fde470716df - LoggerBase.cs: No
2020-06-17T12:41:10.6879131Z matching token was found in the cache
2020-06-17T12:41:10.6896879Z DEBUG: [ADAL]: Verbose: 2020-06-17T12:41:09.8775712Z: 656fdbdc-abb8-48b9-9b05-3fde470716df - LoggerBase.cs: Looking up
2020-06-17T12:41:10.6911289Z cache for a token...
2020-06-17T12:41:10.6941322Z DEBUG: [ADAL]: Verbose: 2020-06-17T12:41:09.8785648Z: 656fdbdc-abb8-48b9-9b05-3fde470716df - LoggerBase.cs: Looking up
2020-06-17T12:41:10.6958009Z cache for a token...
2020-06-17T12:41:10.6993355Z DEBUG: [ADAL]: Information: 2020-06-17T12:41:09.8785648Z: 656fdbdc-abb8-48b9-9b05-3fde470716df - LoggerBase.cs: No
2020-06-17T12:41:10.7013793Z matching token was found in the cache
2020-06-17T12:41:10.7032395Z DEBUG: [ADAL]: Information: 2020-06-17T12:41:09.8785648Z: 656fdbdc-abb8-48b9-9b05-3fde470716df - LoggerBase.cs: No
2020-06-17T12:41:10.7048488Z matching token was found in the cache
2020-06-17T12:41:10.7064835Z DEBUG: [ADAL]: Verbose: 2020-06-17T12:41:09.9589835Z: 656fdbdc-abb8-48b9-9b05-3fde470716df - LoggerBase.cs: Storing
2020-06-17T12:41:10.7078967Z token in the cache...
2020-06-17T12:41:10.7096127Z DEBUG: [ADAL]: Verbose: 2020-06-17T12:41:09.9589835Z: 656fdbdc-abb8-48b9-9b05-3fde470716df - LoggerBase.cs: Storing
2020-06-17T12:41:10.7112057Z token in the cache...
2020-06-17T12:41:10.7137506Z DEBUG: [ADAL]: Verbose: 2020-06-17T12:41:09.9589835Z: 656fdbdc-abb8-48b9-9b05-3fde470716df - LoggerBase.cs: An item was
2020-06-17T12:41:10.7156169Z stored in the cache
2020-06-17T12:41:10.7172828Z DEBUG: [ADAL]: Verbose: 2020-06-17T12:41:09.9589835Z: 656fdbdc-abb8-48b9-9b05-3fde470716df - LoggerBase.cs: An item was
2020-06-17T12:41:10.7187808Z stored in the cache
2020-06-17T12:41:10.7204417Z DEBUG: [ADAL]: Information: 2020-06-17T12:41:09.9589835Z: 656fdbdc-abb8-48b9-9b05-3fde470716df - LoggerBase.cs: ===
2020-06-17T12:41:10.7221505Z Token Acquisition finished successfully. An access token was returned: Expiration Time: 6/17/2020 1:41:08 PM +00:00
2020-06-17T12:41:10.7238423Z DEBUG: [ADAL]: Information: 2020-06-17T12:41:09.9589835Z: 656fdbdc-abb8-48b9-9b05-3fde470716df - LoggerBase.cs: ===
2020-06-17T12:41:10.7257159Z Token Acquisition finished successfully. An access token was returned: Expiration Time: 6/17/2020 1:41:08 PM
2020-06-17T12:41:10.7273263Z +00:00Access Token Hash: FV2YxDTPxAB5opWAoeALvB8=
2020-06-17T12:41:10.7287913Z User id: null
2020-06-17T12:41:10.7304946Z DEBUG: [ADAL]: Information: 2020-06-17T12:41:09.9589835Z: 00000000-0000-0000-0000-000000000000 - LoggerBase.cs:
2020-06-17T12:41:10.7322209Z Serializing token cache with 2 items.
2020-06-17T12:41:10.7338904Z DEBUG: [Common.Authentication]: Authenticating using Account: '***', environment:
2020-06-17T12:41:10.7354582Z 'AzureCloud', tenant: '***'
2020-06-17T12:41:10.7369851Z DEBUG: [Common.Authentication]: Authenticating using configuration values: Domain:
2020-06-17T12:41:10.7386261Z '***', Endpoint: 'https://login.microsoftonline.com/', ClientId:
2020-06-17T12:41:10.7401542Z '1950a258-227b-4e31-a9cf-717495945fc2', ClientRedirect: 'urn:ietf:wg:oauth:2.0:oob', ResourceClientUri:
2020-06-17T12:41:10.7417551Z 'https://graph.windows.net/', ValidateAuthority: 'True'
2020-06-17T12:41:10.7436324Z DEBUG: [Common.Authentication]: Renewing token using AppId: '***', AdalConfiguration
2020-06-17T12:41:10.7453427Z with ADDomain: '***', AdEndpoint: 'https://login.microsoftonline.com/', ClientId:
2020-06-17T12:41:10.7469038Z '1950a258-227b-4e31-a9cf-717495945fc2', RedirectUri: 'urn:ietf:wg:oauth:2.0:oob'
2020-06-17T12:41:10.7483979Z DEBUG: [ADAL]: Information: 2020-06-17T12:41:09.9670696Z: f17713e5-7432-4905-ae45-a2c34a460601 - LoggerBase.cs: ADAL
2020-06-17T12:41:10.7499931Z PCL.Desktop with assembly version '3.19.2.6005', file version '3.19.50302.0130' and informational version
2020-06-17T12:41:10.7516177Z '2a8bec6c4c76d0c1ef819b55bdc3cda2d2605056' is running...
2020-06-17T12:41:10.7532732Z DEBUG: [ADAL]: Information: 2020-06-17T12:41:09.9670696Z: f17713e5-7432-4905-ae45-a2c34a460601 - LoggerBase.cs: ADAL
2020-06-17T12:41:10.7548765Z PCL.Desktop with assembly version '3.19.2.6005', file version '3.19.50302.0130' and informational version
2020-06-17T12:41:10.7565322Z '2a8bec6c4c76d0c1ef819b55bdc3cda2d2605056' is running...
2020-06-17T12:41:10.7583164Z DEBUG: [ADAL]: Information: 2020-06-17T12:41:09.9670696Z: f17713e5-7432-4905-ae45-a2c34a460601 - LoggerBase.cs: ===
2020-06-17T12:41:10.7602625Z Token Acquisition started:
2020-06-17T12:41:10.7624585Z CacheType: null
2020-06-17T12:41:10.7650952Z Authentication Target: Client
2020-06-17T12:41:10.7667244Z , Authority Host: login.microsoftonline.com
2020-06-17T12:41:10.7683624Z DEBUG: [ADAL]: Information: 2020-06-17T12:41:09.9670696Z: f17713e5-7432-4905-ae45-a2c34a460601 - LoggerBase.cs: ===
2020-06-17T12:41:10.7700366Z Token Acquisition started:
2020-06-17T12:41:10.7720339Z Authority: https://login.microsoftonline.com/***/
2020-06-17T12:41:10.7739651Z Resource: https://graph.windows.net/
2020-06-17T12:41:10.7756754Z ClientId: ***
2020-06-17T12:41:10.7773450Z CacheType: null
2020-06-17T12:41:10.7790680Z Authentication Target: Client
2020-06-17T12:41:10.7807288Z
2020-06-17T12:41:10.7825187Z DEBUG: [ADAL]: Verbose: 2020-06-17T12:41:09.9670696Z: f17713e5-7432-4905-ae45-a2c34a460601 - LoggerBase.cs: Loading
2020-06-17T12:41:10.7842586Z from cache.
2020-06-17T12:41:10.7861162Z DEBUG: [ADAL]: Verbose: 2020-06-17T12:41:09.9670696Z: f17713e5-7432-4905-ae45-a2c34a460601 - LoggerBase.cs: Loading
2020-06-17T12:41:10.7876853Z from cache.
2020-06-17T12:41:10.7894195Z DEBUG: [ADAL]: Information: 2020-06-17T12:41:09.9680743Z: 00000000-0000-0000-0000-000000000000 - LoggerBase.cs:
2020-06-17T12:41:10.7910723Z Deserialized 2 items to token cache.
2020-06-17T12:41:10.7928359Z DEBUG: [ADAL]: Verbose: 2020-06-17T12:41:09.9680743Z: f17713e5-7432-4905-ae45-a2c34a460601 - LoggerBase.cs: Looking up
2020-06-17T12:41:10.7946281Z cache for a token...
2020-06-17T12:41:10.7961692Z DEBUG: [ADAL]: Verbose: 2020-06-17T12:41:09.9680743Z: f17713e5-7432-4905-ae45-a2c34a460601 - LoggerBase.cs: Looking up
2020-06-17T12:41:10.7977929Z cache for a token...
2020-06-17T12:41:10.7994625Z DEBUG: [ADAL]: Information: 2020-06-17T12:41:09.9680743Z: f17713e5-7432-4905-ae45-a2c34a460601 - LoggerBase.cs: An item
2020-06-17T12:41:10.8011914Z matching the requested resource was found in the cache
2020-06-17T12:41:10.8027779Z DEBUG: [ADAL]: Information: 2020-06-17T12:41:09.9680743Z: f17713e5-7432-4905-ae45-a2c34a460601 - LoggerBase.cs: An item
2020-06-17T12:41:10.8044797Z matching the requested resource was found in the cache
2020-06-17T12:41:10.8062620Z DEBUG: [ADAL]: Information: 2020-06-17T12:41:09.9680743Z: f17713e5-7432-4905-ae45-a2c34a460601 - LoggerBase.cs:
2020-06-17T12:41:10.8080768Z 59.9831487616667 minutes left until token in cache expires
2020-06-17T12:41:10.8094249Z DEBUG: [ADAL]: Information: 2020-06-17T12:41:09.9680743Z: f17713e5-7432-4905-ae45-a2c34a460601 - LoggerBase.cs:
2020-06-17T12:41:10.8109354Z 59.9831487616667 minutes left until token in cache expires
2020-06-17T12:41:10.8126635Z DEBUG: [ADAL]: Information: 2020-06-17T12:41:09.9680743Z: f17713e5-7432-4905-ae45-a2c34a460601 - LoggerBase.cs: A
2020-06-17T12:41:10.8139648Z matching item (access token or refresh token or both) was found in the cache
2020-06-17T12:41:10.8156819Z DEBUG: [ADAL]: Information: 2020-06-17T12:41:09.9680743Z: f17713e5-7432-4905-ae45-a2c34a460601 - LoggerBase.cs: A
2020-06-17T12:41:10.8171991Z matching item (access token or refresh token or both) was found in the cache
2020-06-17T12:41:10.8188753Z DEBUG: [ADAL]: Information: 2020-06-17T12:41:09.9680743Z: f17713e5-7432-4905-ae45-a2c34a460601 - LoggerBase.cs: ===
2020-06-17T12:41:10.8204352Z Token Acquisition finished successfully. An access token was returned: Expiration Time: 6/17/2020 1:41:08 PM +00:00
2020-06-17T12:41:10.8221558Z DEBUG: [ADAL]: Information: 2020-06-17T12:41:09.9680743Z: f17713e5-7432-4905-ae45-a2c34a460601 - LoggerBase.cs: ===
2020-06-17T12:41:10.8246029Z Token Acquisition finished successfully. An access token was returned: Expiration Time: 6/17/2020 1:41:08 PM
2020-06-17T12:41:10.8269044Z +00:00Access Token Hash: FV2YxDTPxAB5opWFog6jITrALvB8=
2020-06-17T12:41:10.8272749Z User id:
2020-06-17T12:41:10.8283364Z DEBUG: [Common.Authentication]: Checking token expiration, token expires '06/17/2020 13:41:08 +00:00' Comparing to
2020-06-17T12:41:10.8296934Z '06/17/2020 12:41:10 +00:00' With threshold '00:05:00', calculated time until token expiry: '00:59:58.9526246'
2020-06-17T12:41:10.8308260Z DEBUG: ============================ HTTP REQUEST ============================
2020-06-17T12:41:10.8317296Z
2020-06-17T12:41:10.8321801Z
2020-06-17T12:41:10.8328042Z
2020-06-17T12:41:10.8343383Z HTTP Method:
2020-06-17T12:41:10.8349473Z
2020-06-17T12:41:10.8367837Z POST
2020-06-17T12:41:10.8370479Z
2020-06-17T12:41:10.8378911Z
2020-06-17T12:41:10.8382159Z
2020-06-17T12:41:10.8398765Z Absolute Uri:
2020-06-17T12:41:10.8404237Z
2020-06-17T12:41:10.8422482Z https://graph.windows.net/***/getObjectsByObjectIds?api-version=1.6
2020-06-17T12:41:10.8427529Z
2020-06-17T12:41:10.8433060Z
2020-06-17T12:41:10.8438768Z
2020-06-17T12:41:10.8453736Z Headers:
2020-06-17T12:41:10.8459117Z
2020-06-17T12:41:10.8474759Z x-ms-client-request-id : 094879fb-4fa4-48ff-9e1f-ae332fd640d8
2020-06-17T12:41:10.8480296Z
2020-06-17T12:41:10.8496102Z accept-language : en-US
2020-06-17T12:41:10.8501220Z
2020-06-17T12:41:10.8507436Z
2020-06-17T12:41:10.8513052Z
2020-06-17T12:41:10.8528230Z Body:
2020-06-17T12:41:10.8534743Z
2020-06-17T12:41:10.8549838Z {
2020-06-17T12:41:10.8555986Z
2020-06-17T12:41:10.8571753Z "objectIds": [
2020-06-17T12:41:10.8577247Z
2020-06-17T12:41:10.8592535Z "xxxx-xxxx-xxxx-xxxx"
2020-06-17T12:41:10.8597762Z
2020-06-17T12:41:10.8612759Z ],
2020-06-17T12:41:10.8618737Z
2020-06-17T12:41:10.8633729Z "includeDirectoryObjectReferences": true
2020-06-17T12:41:10.8639121Z
2020-06-17T12:41:10.8654190Z }
2020-06-17T12:41:10.8659605Z
2020-06-17T12:41:10.8665892Z
2020-06-17T12:41:10.8681123Z DEBUG: ============================ HTTP RESPONSE ============================
2020-06-17T12:41:10.8686076Z
2020-06-17T12:41:10.8696594Z
2020-06-17T12:41:10.8702654Z
2020-06-17T12:41:10.8718237Z Status Code:
2020-06-17T12:41:10.8724143Z
2020-06-17T12:41:10.8738848Z Forbidden
2020-06-17T12:41:10.8744670Z
2020-06-17T12:41:10.8751421Z
2020-06-17T12:41:10.8758581Z
2020-06-17T12:41:10.8774085Z Headers:
2020-06-17T12:41:10.8779325Z
2020-06-17T12:41:10.8795636Z Pragma : no-cache
2020-06-17T12:41:10.8800567Z
2020-06-17T12:41:10.8817370Z ocp-aad-diagnostics-server-name: mMIERSb7PsZAN6R0JN2LmQRmjBzU2yFl9XMvzIy5o0Q=
2020-06-17T12:41:10.8822483Z
2020-06-17T12:41:10.8837869Z request-id : e4683d79-2ca7-47a8-b704-c5823234d060
2020-06-17T12:41:10.8843676Z
2020-06-17T12:41:10.8859375Z client-request-id : e50942ac-f75b-48ad-bfcc-242a40fa1e11
2020-06-17T12:41:10.8864249Z
2020-06-17T12:41:10.8879422Z x-ms-dirapi-data-contract-version: 1.6
2020-06-17T12:41:10.8884919Z
2020-06-17T12:41:10.8900258Z ocp-aad-session-key :
2020-06-17T12:41:10.8956875Z 3fsrphnaGxpOx_-uu8I-8Qd8s54cRz_dcYUxeBXQgaCavkQdKkV5uFsJ_uqun2lsJ2kEd1kMdu2hH3jo9ZCSS5f6y0D9Qy185HXD3Jj-E5Lqn7nxvLz5XMZ
2020-06-17T12:41:10.8974864Z 8xnXQNYcw.ajh7HQAZ_luIypLh3XL2LoJC0URZls1VjMWbcqZWtE8
2020-06-17T12:41:10.8981104Z
2020-06-17T12:41:10.8998774Z x-aad-resource-unit : 3
2020-06-17T12:41:10.9004968Z
2020-06-17T12:41:10.9028805Z DataServiceVersion : 3.0;
2020-06-17T12:41:10.9034254Z
2020-06-17T12:41:10.9053505Z Strict-Transport-Security : max-age=31536000; includeSubDomains
2020-06-17T12:41:10.9058970Z
2020-06-17T12:41:10.9074115Z Access-Control-Allow-Origin : *
2020-06-17T12:41:10.9085757Z
2020-06-17T12:41:10.9114775Z Duration : 595223
2020-06-17T12:41:10.9119887Z
2020-06-17T12:41:10.9135163Z Cache-Control : no-cache
2020-06-17T12:41:10.9155921Z
2020-06-17T12:41:10.9180184Z Date : Wed, 17 Jun 2020 12:41:09 GMT
2020-06-17T12:41:10.9186542Z
2020-06-17T12:41:10.9200303Z X-AspNet-Version : 4.0.30319
2020-06-17T12:41:10.9205516Z
2020-06-17T12:41:10.9221421Z X-Powered-By : ASP.NET
2020-06-17T12:41:10.9228151Z
2020-06-17T12:41:10.9233781Z
2020-06-17T12:41:10.9239378Z
2020-06-17T12:41:10.9255831Z Body:
2020-06-17T12:41:10.9261630Z
2020-06-17T12:41:10.9276768Z {
2020-06-17T12:41:10.9281969Z
2020-06-17T12:41:10.9300920Z "odata.error": {
2020-06-17T12:41:10.9306427Z
2020-06-17T12:41:10.9322276Z "code": "Authorization_RequestDenied",
2020-06-17T12:41:10.9327234Z
2020-06-17T12:41:10.9342349Z "message": {
2020-06-17T12:41:10.9348084Z
2020-06-17T12:41:10.9363655Z "lang": "en",
2020-06-17T12:41:10.9369867Z
2020-06-17T12:41:10.9386552Z "value": "Insufficient privileges to complete the operation."
2020-06-17T12:41:10.9391966Z
2020-06-17T12:41:10.9407255Z },
2020-06-17T12:41:10.9413293Z
2020-06-17T12:41:10.9432435Z "requestId": "e4683d79-2ca7-47a8-b704-c5823234d060",
2020-06-17T12:41:10.9438139Z
2020-06-17T12:41:10.9454200Z "date": "2020-06-17T12:41:10"
2020-06-17T12:41:10.9460079Z
2020-06-17T12:41:10.9476788Z }
2020-06-17T12:41:10.9482659Z
2020-06-17T12:41:10.9498632Z }
2020-06-17T12:41:10.9504420Z
2020-06-17T12:41:10.9510181Z
2020-06-17T12:41:10.9526291Z DEBUG: [Common.Authentication]: Checking token expiration, token expires '06/17/2020 13:41:08 +00:00' Comparing to
2020-06-17T12:41:10.9542844Z '06/17/2020 12:41:10 +00:00' With threshold '00:05:00', calculated time until token expiry: '00:59:58.8165939'
2020-06-17T12:41:10.9971670Z DEBUG: ============================ HTTP REQUEST ============================
2020-06-17T12:41:10.9980623Z
2020-06-17T12:41:10.9985689Z
2020-06-17T12:41:10.9996177Z
2020-06-17T12:41:11.0006641Z HTTP Method:
2020-06-17T12:41:11.0012340Z
2020-06-17T12:41:11.0027958Z GET
2020-06-17T12:41:11.0034620Z
2020-06-17T12:41:11.0041613Z
2020-06-17T12:41:11.0049150Z
2020-06-17T12:41:11.0066060Z Absolute Uri:
2020-06-17T12:41:11.0073092Z
2020-06-17T12:41:11.0089385Z https://graph.windows.net/***/users/xxxx-xxxx-xxxx-xxxx?api-version=1
2020-06-17T12:41:11.0105973Z .6
2020-06-17T12:41:11.0111181Z
2020-06-17T12:41:11.0117358Z
2020-06-17T12:41:11.0123982Z
2020-06-17T12:41:11.0181195Z Headers:
2020-06-17T12:41:11.0213492Z
2020-06-17T12:41:11.0231704Z x-ms-client-request-id : 1099a304-768f-43c1-9740-c5ec8345b6cf
2020-06-17T12:41:11.0237103Z
2020-06-17T12:41:11.0252767Z accept-language : en-US
2020-06-17T12:41:11.0259813Z
2020-06-17T12:41:11.0266561Z
2020-06-17T12:41:11.0271987Z
2020-06-17T12:41:11.0288461Z Body:
2020-06-17T12:41:11.0294286Z
2020-06-17T12:41:11.0299067Z
2020-06-17T12:41:11.0306076Z
2020-06-17T12:41:11.0311237Z
2020-06-17T12:41:11.0328298Z DEBUG: ============================ HTTP RESPONSE ============================
2020-06-17T12:41:11.0334189Z
2020-06-17T12:41:11.0338959Z
2020-06-17T12:41:11.0344797Z
2020-06-17T12:41:11.0360760Z Status Code:
2020-06-17T12:41:11.0366381Z
2020-06-17T12:41:11.0380793Z Forbidden
2020-06-17T12:41:11.0387839Z
2020-06-17T12:41:11.0393615Z
2020-06-17T12:41:11.0398617Z
2020-06-17T12:41:11.0416106Z Headers:
2020-06-17T12:41:11.0421210Z
2020-06-17T12:41:11.0436066Z Pragma : no-cache
2020-06-17T12:41:11.0441571Z
2020-06-17T12:41:11.0456066Z ocp-aad-diagnostics-server-name: NERpOUuja1N4Kd07HlLwQ/c+LHwviyoU+/4HjTfS86k=
2020-06-17T12:41:11.0460927Z
2020-06-17T12:41:11.0476616Z request-id : 98c63016-15a8-4c4a-a5a9-124d16a3be9c
2020-06-17T12:41:11.0481347Z
2020-06-17T12:41:11.0498690Z client-request-id : e50942ac-f75b-48ad-bfcc-242a40fa1e11
2020-06-17T12:41:11.0504885Z
2020-06-17T12:41:11.0519670Z x-ms-dirapi-data-contract-version: 1.6
2020-06-17T12:41:11.0525088Z
2020-06-17T12:41:11.0540686Z ocp-aad-session-key :
2020-06-17T12:41:11.0554990Z YENGvXQyQoVO9oDxLkRkeTFe0UpZV1fUwgVpOt_RNzUJVg13qMasBtjoBJloe4ZiMw8imP_JFNbX2LnQB0k_4TTDFmJ2w_FXco3DWWALH1qnS3lUvmac5St
2020-06-17T12:41:11.0580744Z ZKiOcyFPE.eStlvFRdZAwrcTlVSA87vfbwO3PQki9jaYbCTJaLcJE
2020-06-17T12:41:11.0586866Z
2020-06-17T12:41:11.0617884Z x-aad-resource-unit : 1
2020-06-17T12:41:11.0622752Z
2020-06-17T12:41:11.0640038Z DataServiceVersion : 3.0;
2020-06-17T12:41:11.0645974Z
2020-06-17T12:41:11.0662235Z Strict-Transport-Security : max-age=31536000; includeSubDomains
2020-06-17T12:41:11.0669146Z
2020-06-17T12:41:11.0686984Z Access-Control-Allow-Origin : *
2020-06-17T12:41:11.0695840Z
2020-06-17T12:41:11.0710777Z Duration : 476412
2020-06-17T12:41:11.0716764Z
2020-06-17T12:41:11.0738090Z Cache-Control : no-cache
2020-06-17T12:41:11.0744487Z
2020-06-17T12:41:11.0759492Z Date : Wed, 17 Jun 2020 12:41:09 GMT
2020-06-17T12:41:11.0764947Z
2020-06-17T12:41:11.0780294Z X-AspNet-Version : 4.0.30319
2020-06-17T12:41:11.0785455Z
2020-06-17T12:41:11.0800221Z X-Powered-By : ASP.NET
2020-06-17T12:41:11.0805785Z
2020-06-17T12:41:11.0811177Z
2020-06-17T12:41:11.0816776Z
2020-06-17T12:41:11.0831791Z Body:
2020-06-17T12:41:11.0837157Z
2020-06-17T12:41:11.0852686Z {
2020-06-17T12:41:11.0860671Z
2020-06-17T12:41:11.0875699Z "odata.error": {
2020-06-17T12:41:11.0881905Z
2020-06-17T12:41:11.0896174Z "code": "Authorization_RequestDenied",
2020-06-17T12:41:11.0901453Z
2020-06-17T12:41:11.0916926Z "message": {
2020-06-17T12:41:11.0922744Z
2020-06-17T12:41:11.0937610Z "lang": "en",
2020-06-17T12:41:11.0943349Z
2020-06-17T12:41:11.0957219Z "value": "Insufficient privileges to complete the operation."
2020-06-17T12:41:11.0962615Z
2020-06-17T12:41:11.0977423Z },
2020-06-17T12:41:11.0982900Z
2020-06-17T12:41:11.1000366Z "requestId": "98c63016-15a8-4c4a-a5a9-124d16a3be9c",
2020-06-17T12:41:11.1005120Z
2020-06-17T12:41:11.1021065Z "date": "2020-06-17T12:41:10"
2020-06-17T12:41:11.1027040Z
2020-06-17T12:41:11.1044378Z }
2020-06-17T12:41:11.1050063Z
2020-06-17T12:41:11.1065451Z }
2020-06-17T12:41:11.1069876Z
2020-06-17T12:41:11.1075585Z
2020-06-17T12:41:11.1091973Z DEBUG: [Common.Authentication]: Checking token expiration, token expires '06/17/2020 13:41:08 +00:00' Comparing to
2020-06-17T12:41:11.1108394Z '06/17/2020 12:41:10 +00:00' With threshold '00:05:00', calculated time until token expiry: '00:59:58.7346640'
2020-06-17T12:41:11.1124079Z DEBUG: ============================ HTTP REQUEST ============================
2020-06-17T12:41:11.1128750Z
2020-06-17T12:41:11.1134324Z
2020-06-17T12:41:11.1139526Z
2020-06-17T12:41:11.1157021Z HTTP Method:
2020-06-17T12:41:11.1163374Z
2020-06-17T12:41:11.1180565Z GET
2020-06-17T12:41:11.1186378Z
2020-06-17T12:41:11.1200554Z
2020-06-17T12:41:11.1205830Z
2020-06-17T12:41:11.1223171Z Absolute Uri:
2020-06-17T12:41:11.1228831Z
2020-06-17T12:41:11.1246352Z https://graph.windows.net/***/users/xxxx-xxxx-xxxx-xxxx?api-version=1
2020-06-17T12:41:11.1262056Z .6
2020-06-17T12:41:11.1267463Z
2020-06-17T12:41:11.1273993Z
2020-06-17T12:41:11.1280155Z
2020-06-17T12:41:11.1295135Z Headers:
2020-06-17T12:41:11.1300738Z
2020-06-17T12:41:11.1316991Z x-ms-client-request-id : e2006b41-c246-41f6-b83d-b278b48aba49
2020-06-17T12:41:11.1323145Z
2020-06-17T12:41:11.1341906Z accept-language : en-US
2020-06-17T12:41:11.1349394Z
2020-06-17T12:41:11.1354876Z
2020-06-17T12:41:11.1361270Z
2020-06-17T12:41:11.1385830Z Body:
2020-06-17T12:41:11.1394931Z
2020-06-17T12:41:11.1399616Z
2020-06-17T12:41:11.1407560Z
2020-06-17T12:41:11.1418032Z
2020-06-17T12:41:11.1445530Z DEBUG: ============================ HTTP RESPONSE ============================
2020-06-17T12:41:11.1455319Z
2020-06-17T12:41:11.1463961Z
2020-06-17T12:41:11.1468973Z
2020-06-17T12:41:11.1487240Z Status Code:
2020-06-17T12:41:11.1493163Z
2020-06-17T12:41:11.1512590Z Forbidden
2020-06-17T12:41:11.1517927Z
2020-06-17T12:41:11.1523452Z
2020-06-17T12:41:11.1529268Z
2020-06-17T12:41:11.1548119Z Headers:
2020-06-17T12:41:11.1553875Z
2020-06-17T12:41:11.1570533Z Pragma : no-cache
2020-06-17T12:41:11.1575371Z
2020-06-17T12:41:11.1593703Z ocp-aad-diagnostics-server-name: GmkFh3lGI5hmMnNZ/Mv7woZBoQ+WkeUIeIxXrCyWU28=
2020-06-17T12:41:11.1599188Z
2020-06-17T12:41:11.1626150Z request-id : 1b076a02-32e1-4a0b-ac8e-af9e5ab63dcc
2020-06-17T12:41:11.1631758Z
2020-06-17T12:41:11.1649158Z client-request-id : e50942ac-f75b-48ad-bfcc-242a40fa1e11
2020-06-17T12:41:11.1654242Z
2020-06-17T12:41:11.1674728Z x-ms-dirapi-data-contract-version: 1.6
2020-06-17T12:41:11.1680074Z
2020-06-17T12:41:11.1696511Z ocp-aad-session-key :
2020-06-17T12:41:11.1714706Z sNOmoZnABLfR_TuKTTxywfRXEIgbeqjuih1eqyIzwtCaurnFnRdXWy4M6-NPUnfX9R6YvV7L9SaGk4SUKQPB51wu5bUYmzsJixFJq1mYTvIaqd5FxIuGmjd
2020-06-17T12:41:11.1730892Z dBPmS63zT.uG1siWuwugiEgCXhxad0hrzunJt6qtwlgvQGcI9Y7jY
2020-06-17T12:41:11.1735900Z
2020-06-17T12:41:11.1752464Z x-aad-resource-unit : 1
2020-06-17T12:41:11.1758370Z
2020-06-17T12:41:11.1781436Z DataServiceVersion : 3.0;
2020-06-17T12:41:11.1786098Z
2020-06-17T12:41:11.1800917Z Strict-Transport-Security : max-age=31536000; includeSubDomains
2020-06-17T12:41:11.1805489Z
2020-06-17T12:41:11.1901769Z Access-Control-Allow-Origin : *
2020-06-17T12:41:11.1907974Z
2020-06-17T12:41:11.1925695Z Duration : 1205759
2020-06-17T12:41:11.1930945Z
2020-06-17T12:41:11.1956960Z Cache-Control : no-cache
2020-06-17T12:41:11.1962813Z
2020-06-17T12:41:11.1982636Z Date : Wed, 17 Jun 2020 12:41:09 GMT
2020-06-17T12:41:11.1987054Z
2020-06-17T12:41:11.2006632Z X-AspNet-Version : 4.0.30319
2020-06-17T12:41:11.2011627Z
2020-06-17T12:41:11.2029855Z X-Powered-By : ASP.NET
2020-06-17T12:41:11.2035879Z
2020-06-17T12:41:11.2040681Z
2020-06-17T12:41:11.2046937Z
2020-06-17T12:41:11.2065132Z Body:
2020-06-17T12:41:11.2071089Z
2020-06-17T12:41:11.2088676Z {
2020-06-17T12:41:11.2094146Z
2020-06-17T12:41:11.2114187Z "odata.error": {
2020-06-17T12:41:11.2119160Z
2020-06-17T12:41:11.2149752Z "code": "Authorization_RequestDenied",
2020-06-17T12:41:11.2155681Z
2020-06-17T12:41:11.2176134Z "message": {
2020-06-17T12:41:11.2180771Z
2020-06-17T12:41:11.2197549Z "lang": "en",
2020-06-17T12:41:11.2203372Z
2020-06-17T12:41:11.2222571Z "value": "Insufficient privileges to complete the operation."
2020-06-17T12:41:11.2227770Z
2020-06-17T12:41:11.2244151Z },
2020-06-17T12:41:11.2249313Z
2020-06-17T12:41:11.2266879Z "requestId": "1b076a02-32e1-4a0b-ac8e-af9e5ab63dcc",
2020-06-17T12:41:11.2273538Z
2020-06-17T12:41:11.2290160Z "date": "2020-06-17T12:41:10"
2020-06-17T12:41:11.2293929Z
2020-06-17T12:41:11.2307722Z }
2020-06-17T12:41:11.2313292Z
2020-06-17T12:41:11.2330074Z }
2020-06-17T12:41:11.2335711Z
2020-06-17T12:41:11.2341487Z
2020-06-17T12:41:11.2360605Z ##[debug]Error record:
2020-06-17T12:41:11.2377168Z ##[debug]Set-AzSqlServerActiveDirectoryAdministrator : Cannot find the Azure Active Directory object 'aaa@aaa.com'. Please make sure that the user or group you are authorizing is registered in the current subscription's Azure Active directory. To get a list of Azure Active Directory groups use Get-AzADGroup, or to get a list of Azure Active Directory users use Get-AzADUser.
2020-06-17T12:41:11.2394198Z ##[debug]At D:\a\_temp\db4dcb6e-bc62-4dc6-8bb2-1d06d11f621d.ps1:43 char:1
2020-06-17T12:41:11.2413656Z ##[debug]+ Set-AzSqlServerActiveDirectoryAdministrator -ResourceGroupName "AR-AZ ...
2020-06-17T12:41:11.2434856Z ##[debug]+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
2020-06-17T12:41:11.2451085Z ##[debug] + CategoryInfo : CloseError: (:) [Set-AzSqlServer...ryAdministrator], ArgumentException
2020-06-17T12:41:11.2468777Z ##[debug] + FullyQualifiedErrorId : Microsoft.Azure.Commands.Sql.ServerActiveDirectoryAdministrator.Cmdlet.SetAzureSqlServer ActiveDirectoryAdministrator
2020-06-17T12:41:11.2484900Z ##[debug]
2020-06-17T12:41:11.2501109Z ##[debug]Script stack trace:
2020-06-17T12:41:11.2518267Z ##[debug]at , D:\a\_temp\db4dcb6e-bc62-4dc6-8bb2-1d06d11f621d.ps1: line 43
2020-06-17T12:41:11.2533828Z ##[debug]at , : line 1
2020-06-17T12:41:11.2551024Z ##[debug]Exception:
2020-06-17T12:41:11.2566124Z ##[debug]System.ArgumentException: Cannot find the Azure Active Directory object 'aaa@aaa.com'. Please make sure that the user or group you are authorizing is registered in the current subscription's Azure Active directory. To get a list of Azure Active Directory groups use Get-AzADGroup, or to get a list of Azure Active Directory users use Get-AzADUser.
2020-06-17T12:41:11.2582881Z ##[debug] at Microsoft.Azure.Commands.Sql.ServerActiveDirectoryAdministrator.Services.AzureSqlServerActiveDirectoryAdministratorAdapter.GetActiveDirectoryInformation(String displayName, Guid objectId, Nullable`1 isAzureADOnlyAuthentication)
2020-06-17T12:41:11.2599548Z ##[debug] at Microsoft.Azure.Commands.Sql.ServerActiveDirectoryAdministrator.Services.AzureSqlServerActiveDirectoryAdministratorAdapter.UpsertServerActiveDirectoryAdministrator(String resourceGroup, String serverName, AzureSqlServerActiveDirectoryAdministratorModel model)
2020-06-17T12:41:11.2618080Z ##[debug] at Microsoft.Azure.Commands.Sql.ServerActiveDirectoryAdministrator.Cmdlet.SetAzureSqlServerActiveDirectoryAdministrator.PersistChanges(IEnumerable`1 entity)
2020-06-17T12:41:11.2634783Z ##[debug] at Microsoft.Azure.Commands.Sql.Common.AzureSqlCmdletBase`2.<>c__DisplayClass16_0.b__0()
2020-06-17T12:41:11.2651020Z ##[debug] at Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet.ConfirmAction(String processMessage, String target, Action action)
2020-06-17T12:41:11.2668454Z ##[debug] at Microsoft.Azure.Commands.Sql.Common.AzureSqlCmdletBase`2.ExecuteCmdlet()
2020-06-17T12:41:11.2686714Z ##[debug] at Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet.ProcessRecord()
2020-06-17T12:41:11.2741728Z ##[error]Cannot find the Azure Active Directory object 'aaa@aaa.com'. Please make sure that the user or group you are authorizing is registered in the current subscription's Azure Active directory. To get a list of Azure Active Directory groups use Get-AzADGroup, or to get a list of Azure Active Directory users use Get-AzADUser.
```
Contributor guide
Research direction
Start with the Set-AzSqlServerActiveDirectoryAdministrator cmdlet and trace the request to the Microsoft.Sql administrators endpoint shown in the debug output. Compare the service-principal and user authentication paths, including the 2019-06-01-preview API request. Done means the provided Azure DevOps service-principal reproduction succeeds for the same SQL server, object ID, and display name.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- azure, csharp, powershell
- Domain
- api, authentication, cloud, databases
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100