azure-samples / service-fabric-aad-helpers Goto Github PK
View Code? Open in Web Editor NEWService Fabric scripts for various Azure AD tasks
License: MIT License
Service Fabric scripts for various Azure AD tasks
License: MIT License
Please provide us with the following information:
x
)- [x ] bug report -> please search issues before submitting
- [ ] feature request
- [ ] documentation issue or request
- [ ] regression (a behavior that used to work and stopped in a new release)
run setupapplications.ps1
WARNING: invoke-graphApiCall status:
exception:
Cannot send a content-body with this verb-type.
Invoke-WebRequest : Cannot send a content-body with this verb-type.
At C:\Tools\scripts\service-fabric-aad-helpers-master\Common.ps1:239 char:19
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
at invoke-graphApiCall, C:\Tools\scripts\service-fabric-aad-helpers-master\Common.ps1: line 239
at invoke-graphApi, C:\Tools\scripts\service-fabric-aad-helpers-master\Common.ps1: line 275
at wait-forResult, C:\Tools\scripts\service-fabric-aad-helpers-master\Common.ps1: line 302
at add-oauthPermissions, C:\Tools\scripts\service-fabric-aad-helpers-master\SetupApplications.ps1: line 285
at enable-AAD, C:\Tools\scripts\service-fabric-aad-helpers-master\SetupApplications.ps1: line 438
at main, C:\Tools\scripts\service-fabric-aad-helpers-master\SetupApplications.ps1: line 149
at , C:\Tools\scripts\service-fabric-aad-helpers-master\SetupApplications.ps1: line 653
at , : line 1
it should create both app registrations
Win11
The script successfully creates the Cluster App, but goes into a wait loop on the client application.
Thanks! We'll be in touch soon.
Currently this script relies on ADAL for .NET Framework, and does not work in PowerShell Core:
New-Object : Cannot find an overload for "PlatformParameters" and the argument count: "1".
At C:\Source\MS\ADP\deploy\sf\scripts\Common.ps1:37 char:27
I suggest switching to New-AzureADApplication
instead of this custom script (and updating the docs accordingly).
- [ ] bug report -> please search issues before submitting
- [ ] feature request
- [x] documentation issue or request
- [x] regression (a behavior that used to work and stopped in a new release)
The latest version of the Nuget package - Microsoft.IdentityModel.Clients.ActiveDirectory v5.2.8 leads to AcquireTokenAsync call failing. The documentation should be updated to install the package v4.5.1 OR update Common.ps1 to adhere to the changes introduced in v5.2.8
The error message complained about no overload of the method accepting 4 arguments.
Scripts run without failure.
Windows 10
$PSVersionTable.PSVersion
Major | Minor | Build | Revision |
---|---|---|---|
5 | 1 | 19041 | 1 |
Please provide us with the following information:
x
)- [ ] bug report -> please search issues before submitting
- [ x] feature request
- [ ] documentation issue or request
- [ ] regression (a behavior that used to work and stopped in a new release)
Try to create app registrations on a Azure Gov account. It fails because the $authString is incorrect for US Go deployments
NA
The Location parameter should include a 'usgov' option to create Applications in Azure Gov
Windows 10.
any
$authString should be:
$authString = "https://login.microsoftonline.us/" + $TenantId
Thanks! We'll be in touch soon.
Please provide us with the following information:
x
)- [x] bug report -> please search issues before submitting
- [ ] feature request
- [ ] documentation issue or request
- [ ] regression (a behavior that used to work and stopped in a new release)
.\SetupApplications.ps1 -TenantId '000000000000000000' -ClusterName 'cluster-name' -WebApplicationReplyUrl 'url:19080/Explorer' -AddResourceAccess
Invoke-RestMethod: C:\Repos\ServiceFabric\service-fabric-aad-helpers\Common.ps1:48
Line |
48 | return (Invoke-RestMethod $uri -Method $method -Headers $headers โฆ
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
| The format of value '' is invalid.
Windows 7, 8 or 10. Linux (which distribution). macOS (Yosemite? El Capitan? Sierra?)
Windows 10
Thanks! We'll be in touch soon.
Please provide us with the following information:
x
)- [x ] bug report -> please search issues before submitting
- [ ] feature request
- [ ] documentation issue or request
- [ ] regression (a behavior that used to work and stopped in a new release)
Executed Powershell to Create AD Application and got failed with below error.
Below is the Error Message .
Invoke-RestMethod : {"odata.error":{"code":"Request_BadRequest","message":{"lang":"en","value":"Cannot convert a primitive value to the expected type
'Edm.DateTime'. See the inner exception for more details."},"requestId":"091ac313-7af5-42ce-80a0-9ed114fda013","date":"2020-05-12T12:51:36"}}
At C:\GepGit\service-fabric-aad-helpers\Common.ps1:48 char:13
return (Invoke-RestMethod $uri -Method $method -Headers $headers ...
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
return (Invoke-RestMethod $uri -Method $method -Headers $headers ...
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
It should execute without error
Windows 7, 8 or 10. Linux (which distribution). macOS (Yosemite? El Capitan? Sierra?)
Windows 10
EnterPrice
Thanks! We'll be in touch soon.
x
)- [X] bug report -> please search issues before submitting
- [ ] feature request
- [ ] documentation issue or request
- [ ] regression (a behavior that used to work and stopped in a new release)
Run CleanupApplications.ps1 without passing -WebApplicationUri
Invoke-RestMethod : {"odata.error":{"code":"Request_BadRequest","message":{"lang":"en","value":"Values of identifierUri
s property must use a verified domain of the organization or its subdomain: 'https://ServiceFabricCluster'"},"requestId
":"81b18a03-a14f-4530-ae15-9aa5f35a5d26","date":"2021-12-02T11:53:37","values":[{"item":"PropertyName","value":"identif
ierUris"},{"item":"PropertyErrorCode","value":"HostNameNotOnVerifiedDomain"},{"item":"HostName","value":"https://Servic
eFabricCluster"}]}}
At C:\Users\######\Source\repos\service-fabric-aad-helpers\Common.ps1:48 char:13
+ return (Invoke-RestMethod $uri -Method $method -Headers $headers ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : InvalidOperation: (System.Net.HttpWebRequest:HttpWebRequest) [Invoke-RestMethod], WebExc
eption
+ FullyQualifiedErrorId : WebCmdletWebResponseException,Microsoft.PowerShell.Commands.InvokeRestMethodCommand
WARNING: Web Application Creation Failed
App registrations gets created with the default identifier URI (
api://<appId>
orapi://<tenantId>/<appId>
)
Or
Get an error that saysWebApplicationUri
is a required parameter.
Windows 10
1.0.4
If no value is passed for parameter WebApplicationUri
, it'll default to https://ServiceFabricCluster
.
However, due to the breaking changes in Azure AD as of october 2021 it is now required that the AppId URI is in the verified domains list.
x
)- [x ] bug report -> please search issues before submitting
- [ ] feature request
- [ ] documentation issue or request
- [ ] regression (a behavior that used to work and stopped in a new release)
$Configobj = .\SetupApplications.ps1 -TenantId '0e3d2646-78b3-4711-b8be-74a381d9890c' -ClusterName 'mysftestcluster' -WebApplicationReplyUrl 'https://mysftestcluster.eastus.cloudapp.azure.com:19080/Explorer/index.html' -AddResourceAccess
.\SetupUser.ps1 -ConfigObj $Configobj -UserName 'TestUser' -Password 'P@ssword!123'
.\SetupUser.ps1 -ConfigObj $Configobj -UserName 'TestAdmin' -Password 'P@ssword!123' -IsAdmin
Successful execution of script and able to execute on 'nuget.exe' in same directory.
Windows 10.
Modified 'Common.ps1' with '& .\nuget.exe install $ADPackage > nuget.log
' and the script executed fine.
Thanks! We'll be in touch soon.
I am getting the following error while running the script
Cannot find an overload for "AcquireTokenAsync" and the argument count: "4"
The installed version of Microsoft.IdentityModel.Clients.ActiveDirectory is 5.2.6
Cannot find an overload for "AcquireTokenAsync" and the argument count: "4".
At C:\Users\pbinil\service-fabric-aad-helpers-master\service-fabric-aad-helpers-master\Common.ps1:38 char:5
$accessToken = $authenticationContext.AcquireTokenAsync($resource ...
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
- CategoryInfo : NotSpecified: (:) [], MethodException
- FullyQualifiedErrorId : MethodCountCouldNotFindBest
Invoke-RestMethod : {"odata.error":{"code":"Authentication_MissingOrMalformed","message":{"lang":"en","value":"Access
Token missing or malformed."}}}
At C:\Users\pbinil\service-fabric-aad-helpers-master\service-fabric-aad-helpers-master\Common.ps1:48 char:13
return (Invoke-RestMethod $uri -Method $method -Headers $headers ...
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
- CategoryInfo : InvalidOperation: (System.Net.HttpWebRequest:HttpWebRequest) [Invoke-RestMethod], WebExc
eption- FullyQualifiedErrorId : WebCmdletWebResponseException,Microsoft.PowerShell.Commands.InvokeRestMethodCommand
WARNING: Web Application Creation Failed
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.